AriD 0 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 Share this post Link to post Share on other sites
JohnOne 1,603 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. Share this post Link to post Share on other sites
AriD 0 Posted May 21, 2010 Adlibregister seems to do the trick so far. Thanks for pointing it out, Ari Share this post Link to post Share on other sites