Jump to content
Macro Express Forums

return to beginning of (incremented) loop


ecoast

Recommended Posts

I have a macro to perform repetitive data entry on the web. The Macro feeds from a CSV file via a user-prompted, incremented loop.

 

All data to be entered for each incremented round, comes from a single line in the CSV file, then moves to the next line...

 

The only problem I see to be having now is, while data is being entered on the web, sometimes the web pages time out, and in this case a Refesh is not the solution.

 

What I need to happen is for the Macro to close the current IE window, and return to the top of the loop and start over.

 

I am having some trouble with some of th repeat commands, so i felt comfortable asking someone who may already have this in use

 

Help is appreciated!

 

Thanks!

Link to comment
Share on other sites

Currently there is not a way to instruct a macro to return to a specific line and start again from that location. In your case, the only thing I can suggest is to insert an If statement within the ASCII process loop that somehow determines if the page has quit responding. If it has, then close IE, restart it, and then place all of the necessary commands from the ASCII process loop after the If statement. Close with an End If.

 

So, if the page times out, the macro goes to the If statement and runs all of the commands before the End If. If it doesn't time out, then the If section of the macro is skipped.

Link to comment
Share on other sites

What I do is to use the ASCII File Process but in the command I start at record N1 and process one record. It's a neat way to go in and grab a specific line. Then outside I have an infinite repeat loop that increments N1. This way I can control the logic better to recover from a failure. So put a repeat loop around the ASCII File Process and the actions you are preforming and include some test for success. This way you can keep repeating this until T1=Success and once it exits the loop on this criteria it goes to the master loop that increments N1.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...