AriD Posted May 20, 2010 Share Posted May 20, 2010 How can I look for a specific window to appear at any time during the script? I my example, the AutoPlay window might pop up at any time during my script and I would like to minimize it if it does. I know that If WinExists("AutoPlay") Then WinSetState("AutoPlay","",@SW_HIDE) would do the trick, but is there a way to get this to run throughout the duration of the AutoIt script (without just pasting it in every other line)? Thanks, Ari Link to comment Share on other sites More sharing options...
JohnOne Posted May 20, 2010 Share Posted May 20, 2010 AdlibRegister("_HideWindow") Func _HideWindow() If WinExists("AutoPlay") Then WinSetState("AutoPlay", "", @SW_HIDE) EndIf EndFunc Read about AdlibRegister in the helpfile before using it. This is just one way of doing it, there are others such as just adding the function in your script loop. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AriD Posted May 21, 2010 Author Share Posted May 21, 2010 Adlibregister seems to do the trick so far. Thanks for pointing it out, Ari 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