Jump to content

How do i make autoit detect a popped up window?


benson
 Share

Recommended Posts

For example, i'm currently running a set of processes that changes configurations for a program.

It's being looped using While WEnd loop. there are times it just keeps on going with the process and there are times when a window with an ok button pops up (like a msgbox).

my code uses the SelectString to change the combo box options. when a particular selection is made, it automatically pops up the msgbox.

While .....

set ComboBox item using SelectString

If WinExists("pop up box") Then

WinActivate("pop up box")

WinWaitActive("pop up box")

ControlClick("pop up box", "", "Button1") ; ok button

EndIf

Wend

the above code doesn't seem to work with the whole program but it works if i simulate manually, select the item in the combo and run the WinExists alone.

How do i make AutoIt detect the new window and click the ok button of the new window automatically.

Thanks.

Link to comment
Share on other sites

For example, i'm currently running a set of processes that changes configurations for a program.

It's being looped using While WEnd loop. there are times it just keeps on going with the process and there are times when a window with an ok button pops up (like a msgbox).

my code uses the SelectString to change the combo box options. when a particular selection is made, it automatically pops up the msgbox.

While .....

set ComboBox item using SelectString

If WinExists("pop up box") Then

WinActivate("pop up box")

WinWaitActive("pop up box")

ControlClick("pop up box", "", "Button1") ; ok button

EndIf

Wend

the above code doesn't seem to work with the whole program but it works if i simulate manually, select the item in the combo and run the WinExists alone.

How do i make AutoIt detect the new window and click the ok button of the new window automatically.

Thanks.

Try to see this:

http://www.autoitscript.com/forum/index.ph...=35694&st=0

You wil have to rewrite for your needs.

Link to comment
Share on other sites

...

How do i make AutoIt detect the new window and click the ok button of the new window automatically.

Thanks.

If the Window title(s)/text are constant and known ahead of time then check out the AdLib() function.
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...