PatL Posted June 1, 2008 Posted June 1, 2008 When running the script to modify an application's settings in a dialogue box and the script tries to enter a value that is out of range, the application comes up with a dialogue box saying it need to adjust the setting to put in in acceptable range. I click the OK box in the dialogue box to proceed and the script locks up the computer. Is there a way to detect the condition and handle it to avoid the lock up? Thanks
amokoura Posted June 1, 2008 Posted June 1, 2008 You could use some winwaitclose() to check when the dialog disappears and then proceed code execution. Maybe that way you could avoid the script going to an unknown state.
PatL Posted June 1, 2008 Author Posted June 1, 2008 I am not sure how to apply winwaitclose() ....I am rather new. Can you suggest some code segment? The dialogue box only shows up on occasion (i.e. when the user puts in an entry out of range). Thanks
amokoura Posted June 1, 2008 Posted June 1, 2008 (edited) Allright if the dialog pops up sometimes maybe this is suitable ; ... ; Some code here that might pop up the dialog ; ... ; Wait 2 seconds for dialog box if winwait("dialog title", "", 2) then ; Use "y" for "Yes" or whatever closes the dialog ({Enter} maybe?) Send("y") ; Give some time for closing. Use WinWaitClose if you want to be precise Sleep(250) endif ; ... ; The code will continue here regardless of the dialog box ; ... Edited June 1, 2008 by amokoura
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