Error GOTO?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
sdtony
Posts: 31
Joined: Tue Dec 13, 2005 6:15 am

Error GOTO?

Post by sdtony » Fri Dec 23, 2005 3:36 am

Is there a way to go back and replay a few steps after an error occurs in an internet macro?
ie An error occurs on step 9 so go back and restart at step 6
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Fri Dec 23, 2005 4:13 pm

This can be done using the Scripting interface. You would split your current macro into three parts and create a macro that incorporates (only) your critical steps (called macro_maybe_repeat in the example below). You can then use the return code of the iimPlay command to see if an error occurred. If the return code is positve, you know everything was ok and you can continue. If not, you just run the macro again.

i = iim1.iimPlay ("macro_first_part")
For m = 1 to 100
i = iim1.iimPlay ("macro_maybe_repeat")
if i > 0 then exit for

Next
i = iim1.iimPlay ("macro_next_part")
Post Reply