Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

coping w/ win32 gui mishaps

by orbital (Scribe)
on Mar 16, 2001 at 04:45 UTC ( #64852=snippet: print w/replies, xml ) Need Help??
Description: Just today, I ran into an issue where some of our production transform software expired (actually the software checks a dongle on the || port). Everytime the software went to transform an AFP to PDF it would throw up 3 registration messages, that had to be manually clicked on each time. This might have been alright if I had a dozen or so files to transform, but in this case I still had close to 5,000. I found the Win32::GuiTest mod on CPAN and it works great! *We already contacted the vendor and once this production run is complete, our software will be complient once again :)
use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendKeys);

while (FindWindowLike(0, "^Elixir Transformation Suite","",0,1)) {
    my @windows = FindWindowLike(0, "^Key Message","",0,1);
    for (@windows) {
        SetForegroundWindow($_);
        SendKeys("{ENTER}");
        sleep(1);
        }
    sleep(5);    
    }
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2023-09-24 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?