hmes Posted September 24, 2010 Share 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 Link to comment Share on other sites More sharing options...
Gestalt Posted September 24, 2010 Share Posted September 24, 2010 (edited) Have you tried If WinActive...? Edited September 24, 2010 by Gestalt Link to comment Share on other sites More sharing options...
Bert Posted September 24, 2010 Share 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/ Link to comment Share on other sites More sharing options...
Tvern Posted September 24, 2010 Share 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 Link to comment Share on other sites More sharing options...
xPloit Posted September 24, 2010 Share Posted September 24, 2010 If WinActive($Win) Then blah blah blah Else Exit EndIf should work for you 00101101011110000101000001101100011011110110100101110100 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now