hmes 0 Posted September 24, 2010 (edited) Yea, command WinWaitActive starts my script if chosen window is activated but if same window is inactive it still works Im looking for something that active my script ONLY if specified window is active and disactive if that window is closed or is inactive Edited September 24, 2010 by hmes Share this post Link to post Share on other sites
Gestalt 0 Posted September 24, 2010 (edited) Have you tried If WinActive...? Edited September 24, 2010 by Gestalt Share this post Link to post Share on other sites
Bert 1,430 Posted September 24, 2010 Look at this script from a few years ago. It concerns HotKeySet, but the same concept can be used for what you have in mind. It should give you some direction. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites
Tvern 11 Posted September 24, 2010 Look at this script from a few years ago. It concerns HotKeySet, but the same concept can be used for what you have in mind. It should give you some direction. I think you forgot the link. @OP: You mean something like this? Local $sTitle = "Window title goes here" While 1 WinWaitActive($sTitle) ;wait untill window is active While WinActive($sTitle) ;run while the window is active ConsoleWrite("The script is running" & @CRLF) Sleep(1000) WEnd ConsoleWrite("The script is pauzed"& @CRLF) WEnd Share this post Link to post Share on other sites
xPloit 0 Posted September 24, 2010 If WinActive($Win) Then blah blah blah Else Exit EndIf should work for you 00101101011110000101000001101100011011110110100101110100 Share this post Link to post Share on other sites