in reply to Re^2: Automatic User input
in thread Automatic User input

I check out autoitscript, it is not what I am looking for.. I am looking for a method/function do to User input without having the User there.

Replies are listed 'Best First'.
Re^4: Automatic User input
by Anonymous Monk on Jan 29, 2011 at 16:51 UTC
    That is exactly what its for (only way to do these types of things), same as Win32::GuiTest
Re^4: Automatic User input
by starface245 (Novice) on Feb 03, 2011 at 21:27 UTC
    here my code using Expect...
    #!/usr/bin/perl use strict; use warnings; use Expect; my $selection = "option1" my $openprogram = system("progam.exe"); my $exp = Expect->spawn($openprogram) or die; $exp-> send ("$selection"); It does not work :( .. I get error Cannont exec(0):no such file or directory
    Program Died.
      It's been a long time, and I no longer have Expect on hand, but I think you want to change this:
      my $openprogram = system("progam.exe");
      To:
      my $openprogram = 'progam.exe'; # or '/path/to/program.exe'
      Expect->spawn is analogous to system; you don't need both.