I'm assuming that the reference to "an .exe program" and your description of what I call a pop up window would indicate that you're on a Windows system. Is that correct?
If so, the answer to your question is yes. Here's how I would approach this task:
- start a new thread that will do the task of calling the .exe program
- have a while loop checking to see if the thread is joinable
- check to see if the pop up window exists
- if the pop up window exists, automate the response
- join the thread
- repeat the above steps for any subsequent .exe calls
For the window automation, you can use Win32::GuiTest. It will have functions that will help you find the pop window and to interact with it (mouse clicks, keystrokes). My recommendation would be to use keystrokes rather than mouse clicks with the Win32::GuiTest stuff.
Another alternative to the Win32::GuiTest would be to use AutoIt. In that case, you would create an AutoIt script and then either call that script from your Perl code or make your AutoIt script an .exe program and call that from your Perl code.
Personally, I would recommend sticking with Win32::GuiTest rather than using AutoIt. However, you might find it useful to get AutoIt for its AutoIt Window Info Tool, which can be used to get information about the windows that you are trying to automate.
|