Wberg Posted August 1, 2009 Share Posted August 1, 2009 I use AutoIt to run som scripts in explorer... the title of the window is "ikarim" which i use in the begining with WinActivate("Ikariam") But i was wondering what to do if i want the script to pause if i manually unfocus ikariam... Thnx in advance >_< Link to comment Share on other sites More sharing options...
Info Posted August 1, 2009 Share Posted August 1, 2009 (edited) While 1 If WinActive("ikarim") = 0 Then ;0 means the window is not active, check the helpfile for the return values of each function. Do Sleep(50) Until WinActive("ikarim") = 1 EndIf WEnd This will pause your script if the window "ikarim" is not active. Less Sleep() value means more CPU usage as far as I know. Edited August 1, 2009 by Info 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