Sign in to follow this  
Followers 0
AriD

If a specific window exists at any time during the script?

3 posts in this topic

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



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

Adlibregister seems to do the trick so far.

Thanks for pointing it out,

Ari

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0