[R] TR: Simulate keyboard

Philipp Pagel p.pagel at wzw.tum.de
Mon May 16 18:43:53 CEST 2011


On Mon, May 16, 2011 at 01:50:15PM +0200, Thibault Charles wrote:
> Thank you for your response.
> 
> In this case, do you think it is possible to write a little program in java
> which would execute my script and simulate a press on my keyboard ?

I think you need to do it the other way round: let R call an extrenal
scripts that handles the press-enter business (expect/Java/whatever).

I still think expect would be easieast, but if you feel more
comfortable with Java, that's going to work aswell. 

Coming to thionk of it: your external software is purely text based
(i.e. running in a DOS-box), isn't it? If it's not, and you are
actually getting message windows, 'expect' won't be much help but
there are several tools out there that will happily record your ations
(keyboard and mouse events alike) and play them back later: google for
'windows macro recorder' and you'll get more varieties than you will
care for.

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/



More information about the R-help mailing list