Edge118 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to get the WaitWindow method to work:
use Win32::GuiTest qw(WaitWindow GetForegroundWindow SetForegroundWind +ow SendKeys); system("start WINWORD.exe"); sleep 3; $parentWindow = GetForegroundWindow(); SendKeys("%of"); $success = WaitWindow('^Font$',1); print $success;
The error I get is: "WaitWindow" is not exported by the Win32::GuiTest module Can't continue after import errors at gui.pl line 1 BEGIN failed--compilation aborted at gui.pl line 1.

I removed the WaitWindow from line 1 and got the following error: Undefined subroutine &main::WaitWindow called at gui.pl line 11.

I appreciate any help you can give me. Thanks!

Replies are listed 'Best First'.
Re: Problem with WaitWindow() in Win32::GuiTest
by particle (Vicar) on Jul 27, 2004 at 15:55 UTC

    the WaitWindow subroutine was added in release 1.50.2-ad of Win32::GuiTest. if you have an earlier release (like 1.3.0,) WaitWindow won't work. try:

    use Win32::GuiTest 1.50.2 qw(...);

    ~Particle *accelerates*

      I had the 1.3 version. Thanks.