Jump to content

Best way to close a alert window


motormad
 Share

Recommended Posts

Sometimes if i fil in a form a 'alert windaw' appears.

I want to be sure that i closed (with yes or no) this window before i move on.

is this the best way of doing this? :graduated:

If WinExists("[title:Controle; CLASS:#32770]")=1 Then
do 
WinActivate("[title:Controle; CLASS:#32770]")
ControlClick("[title:Controle; CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]")
until WinExists("[title:Controle; CLASS:#32770]")=0
endif
Link to comment
Share on other sites

Sometimes if i fil in a form a 'alert windaw' appears.

I want to be sure that i closed (with yes or no) this window before i move on.

is this the best way of doing this? :graduated:

If WinExists("[title:Controle; CLASS:#32770]")=1 Then
do 
WinActivate("[title:Controle; CLASS:#32770]")
ControlClick("[title:Controle; CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]")
until WinExists("[title:Controle; CLASS:#32770]")=0
endif

you can try like this too...

While WinExists("[title:Controle; CLASS:#32770]")
    WinActivate("[title:Controle; CLASS:#32770]")
    ControlClick("[title:Controle; CLASS:#32770]", "", "[CLASS:Button; INSTANCE:1]")
WEnd

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...