Hi , I've written a code which should do the following function :till the window which is matched is active my script should be paused and as soon as that window ends my script should end.
use strict; use warnings; use Win32::GuiTest qw(:ALL); my @window=FindWindowLike(undef,"Calculator"); while($window[0]) { print("calculator window is open"); sleep 2; }
Now this script is not performing the function I require it to do. what is happening is it is going in a infinite loop and after the calculator window is closed then also it is printing "calculator window is open" with 2 seconds gap each time and the script keeps running.
P.S. calculator is taken as an example only. I've tried this with few other windows as well. it does not work.
P.S. I am not getting any error message as the script keeps running and does not end.
Any suggestions or help is appreciated! Thanks in advance .
In reply to Win32::GuiTest module application problem by ankit.tayal560
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |