benson Posted January 25, 2008 Posted January 25, 2008 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.
Ármányos Kő Posted February 1, 2008 Posted February 1, 2008 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 EndIfWendthe 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=0You wil have to rewrite for your needs.
ResNullius Posted February 1, 2008 Posted February 1, 2008 ...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.
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