Runtime.exec to send a key
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, June 19, 2006 03:09 PM

Hi Gurus,

This is my program. I want to send ctl+n key to the process. This program is going to run under unix console.
I don't think so, awt.robot can support this.
new ideas?

---------------------------------------------------------
Process p = Runtime.getRuntime().exec("run.sh");
PrintWriter out =new PrintWriter( p.getOutputStream() );

//send the ctl+n key to the process
int key = ctl+n;
out.println( key );
out.flush();
---------------------------------------------------------

With love
SAN

About | Sitemap | Contact