On Mon, May 16, 2011 at 11:27:05AM +0200, Thibault Charles wrote:
> I cannot find a way to simulate a keyboard event as pressing the ?enter?
> key.
> for (i in 1:nombre_fichiers_monteCarlo){
> system(paste('"C:/Trnsys17/Exe/TRNExe.exe"',liste_dck_monteCarlo[i]),wait=TRUE)
> }
> 
> My problem is that at each step, trnsys ask the user to press ?enter? from
> the keyboard and I would like not have to press myself on ?enter?.
> 
> Does exist a function to simulate this kind of keyboard event ?
I don't think R can handle that (but I may be wrong). On a UNIX
platform, this kind of problem could be tackled with the expect
command. 

Your code above suggests you are on a Windows platform. I did a quick
google search and it seems that expect is available for windows as
part of the CYGWIN suite. And there also seems to be an expect for
windows from activestate:

http://docs.activestate.com/activetcl/8.5/expect4win/

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/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to