amartin99 Posted February 8, 2012 Report Share Posted February 8, 2012 Hello I have a macro that uses the wait for window to appear command and often the window doesn’t ever appear so the macro times out I need it to just start over if the window doesn’t appear but I can't find any options on that command for failures Quote Link to comment Share on other sites More sharing options...
acantor Posted February 11, 2012 Report Share Posted February 11, 2012 Macro Express Pro supports error trapping, including the ability to perform an action when a command times out. It would be easier to accomplish what you want to do with MEP. Quote Link to comment Share on other sites More sharing options...
paul Posted February 11, 2012 Report Share Posted February 11, 2012 Hello I have a macro that uses the wait for window to appear command and often the window doesn’t ever appear so the macro times out I need it to just start over if the window doesn’t appear but I can't find any options on that command for failures In ME3 you will have to handle this yourself. Your code will follow this logic: Repeat until %n1% <> %n1% (i.e. for ever) Launch program that opens your target window Set %n1% to 0 (just in case this variable has already been set to other than 0) Repeat 10 times If target window is present set %n1% = 1 Repeat exit else delay 2 seconds End if End repeat If %n1% = 1 Repeat exit End if End repeat Notes - Each "wait for window" set of commands (the inner repeat loop) will wait for up to 20 seconds - you can vary this as you like. - You need to determine how long to allow the outer loop to run before giving up - follow the same technique as for the inner repeat loop. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.