Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Automating user input

by sam_bakki (Pilgrim)
on Feb 07, 2013 at 06:23 UTC ( #1017569=note: print w/ replies, xml ) Need Help??


in reply to Automating user input

Hi

You can try Win32::GuiTest http://search.cpan.org/~karasik/Win32-GuiTest-1.60/lib/Win32/GuiTest.pm and using FindWindowLike , SendKeys APIs, you can send key strokes to Any window (including cmd prompt)

I have done a script some time back to do the similar job.

  1. start the app / script which needs an input in background and redirect the output to file, (Ex:start perl.exe abc.pl > out.txt 2>&1 )
  2. Monitor out.txt in your automate script and look for patterns to enter your input
  3. use Win32::GuiTest and send keystroke to the app/script which was started in background.



Thanks & Regards,
Bakkiaraj M
My Perl Gtk2 technology demo project - http://code.google.com/p/saaral-soft-search-spider/ , contributions are welcome.


Comment on Re: Automating user input
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-06 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (72 votes), past polls