soum Posted September 21, 2005 Share Posted September 21, 2005 Hi All! I am a new user of AutoIt. I am trying to use AutoIt to Automate a Wizard. The wizard is having a form. I can successfully fill all the text boxes of that form using the auto-it . But when I Click on OK of that window, the form opens a modal dialog box and processes the information. I need to wait for this modal window to close. I tryied to use the WinWailClose("Window Title") function. But Autoit is not waiting for the dialog to close. It continues executing the script. I used WinExists("Window Title") function. It returned 0 even the dialog exist. Can any one please tell me how to use AutoIt to deal with this situation? Thanks A lot in advance. Regards Soum Link to comment Share on other sites More sharing options...
BigDod Posted September 21, 2005 Share Posted September 21, 2005 What happens after the dialog box processes the information. Does another box popup or anything. If yes you may be able to use WinWaitActive. Failing that let us know what you are trying to install as someone may already have experience with it. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted September 21, 2005 Share Posted September 21, 2005 try to use "AU3Inof.exe" it is in you autoit folder just maybe it could show some info on that window if it does press "alt + Print scrren" to grab a pic of it and post it here 8) Link to comment Share on other sites More sharing options...
soum Posted September 22, 2005 Author Share Posted September 22, 2005 What happens after the dialog box processes the information. Does another box popup or anything. If yes you may be able to use WinWaitActive. Failing that let us know what you are trying to install as someone may already have experience with it.I have tried to use WinWaitActive. But it is giving me the following error: "Run-Time error 401 : Can't show non-modal form when modal form is displayed"After this the application is crashing. This error neve comes when I do the same steps manually. Please Help RegardsSoumfirst wait for the window... then wait for it to close...Lar.Auto-it is not able to detect the modal window(because WinExists returns 0). I am not sure how to wait for the window.please helpSoum Link to comment Share on other sites More sharing options...
Valuater Posted September 22, 2005 Share Posted September 22, 2005 you could try a large "sleep" function 1000 = 1 second Sleep(7000) ; wait 7 seconds ********** or show us the script and a pic of the window in question 8) Link to comment Share on other sites More sharing options...
soum Posted September 22, 2005 Author Share Posted September 22, 2005 do you mean a multiple document interface (MDI) window?Lar.No It is a Single document window.Soum Link to comment Share on other sites More sharing options...
soum Posted September 22, 2005 Author Share Posted September 22, 2005 you could try a large "sleep" function 1000 = 1 secondSleep(7000) ; wait 7 seconds**********or show us the script and a pic of the window in question8)This is the Window I am Trying to AUTOMATE.This is the error I am getting.I use The Following Code to Wait for the window called "Verifying Security".$ret=WinWaitClose("Verifying Security","",60000)MsgBox(0, "AutoIt", $ret)I Tried the other options specified by the you also. Like WinWaitActive("Add Computer") [This is the parent Window]Please helpThanks & RegardsSoum Link to comment Share on other sites More sharing options...
BigDod Posted September 22, 2005 Share Posted September 22, 2005 Can you use WinGetState on the offending window, if so you may be able to use this to check when the window is not active. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted September 22, 2005 Share Posted September 22, 2005 ok... it looks like its verifying and (to me [just guessing]) will close after verification and i do not think AU3Info can't get a Control from this type of GUI So 1 you could use a sleep as i suggested before Sleep(10000) ; sleeps for 10 seconds if you can wait it out 2 you could check ProcessExit() before and after to try to find a process that runs when this box comes up... then use While 1 if Not processexist(" ? the process name ? ") Then ExitLoop Endif Sleep(20) Wend 3 You could wait for this box to complete ( like i said... i am gussing it does complete with no user action needed) and then see which control on your original GUI is given focus. The use AU3Info tool to get the control info and use a control command like While 1 If ControlCommand(" bla ", " bla ", "", " Is Enabled") Then ExitLoop Endif Wend to wait for " Is Enabled" Check help on these features for the correct control hope that helps..... i know you are trying.... and we respect people who try 8) Link to comment Share on other sites More sharing options...
Valik Posted September 22, 2005 Share Posted September 22, 2005 Try using "Opt("WinSearchChildren", 1)" as the modal window is a child window of the top-level parent. Link to comment Share on other sites More sharing options...
soum Posted September 26, 2005 Author Share Posted September 26, 2005 Hi , I have found from the MSDN (http://msdn.microsoft.com/library/default....modcantshow.asp) that the cause of is error is the show or set visiable property of the non-modal form. When we call WinWaitClose or any other WinWait... functions on a modal window, does auto-it calls the show or visiable property of the non-modal forms? My question is how it itarate through all the windows. Does it call the show or Set visiable property of all the existing windows to find out whether they are visiable?Thanks a lot for your help.waiting for your replyRegardsSoum Link to comment Share on other sites More sharing options...
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