#!/usr/bin/perl use strict; use warnings; use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendKeys); # get the password via $ARGV[0], hard coding, or whatever my $password; # Append a tilde (Win32::GUITest shortcut for ) $password .= '~'; # This is the only way I could run the Juno dialer on WinNT 4 workstation, YMMV system('c:/Winnt/Profiles/All Users/Desktop/Juno and Juno Platinum.lnk'); sleep(10); # My Juno configuration is hosed. The dialer pops up a box saying something # about it with an "OK" button. Press that button, I'm too lazy. SendKeys('~'); sleep(10); my @windows = FindWindowLike(0, " Logon"); for (@windows) { SetForegroundWindow($_); # my Juno installation stores my username and the cursor is ready for password entry SendKeys($password); } # YMMV with sleep time sleep(90);