Replay if error ?

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Replay if error ?

by Doctordien on Tue Apr 24, 2018 1:44 am

c

Hi guys, i'm completely a newbie.
I'm working on creating an iMacros script. Is there anyway to replay the previous step if error found ? My script works just fine except that sometimes the sever gets down which causes my script to stop playing ( it handles at that step without playing ) Note that I used SET ERROR IGNORE but it doesn't work, the script just stops playing.
I started to think on creating a java script with some if statements to replay the macros if errors found. However, I don't know much about java, can someone please help me generating the necessary code in this case ?
Doctordien
 
Posts: 1
Joined: Tue Apr 24, 2018 1:39 am

Re: Replay if error ?

by chivracq on Tue Apr 24, 2018 2:40 pm

Doctordien wrote:c

Hi guys, i'm completely a newbie.
I'm working on creating an iMacros script. Is there anyway to replay the previous step if error found ? My script works just fine except that sometimes the sever gets down which causes my script to stop playing ( it handles at that step without playing ) Note that I used SET ERROR IGNORE but it doesn't work, the script just stops playing.
I started to think on creating a java script with some if statements to replay the macros if errors found. However, I don't know much about java, can someone please help me generating the necessary code in this case ?

CIM...! :mrgreen: (Read my Sig...)

If you are "completely a newbie", then tja...!, you first need to read a bit of the Documentation and a few (relevant) Threads on the Forum, what you want sounds very "Legit" to me and you'll find many similar Threads on the Forum, so the Answer to your "Is there anyway to replay the previous step if error found ?" Qt is obviously a "YES of course...!", but your Post is completely vague at this moment without Script and URL... (and what you've tried and where you get stuck...) :idea:

We (Advanced Users) are here to help you but you need to "try your best" by yourself, then yep, we are here to help you if you "really" get stuck... 8)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Replay if error ?

by access2vivek on Sun Nov 04, 2018 5:41 am

I think the following is what you are trying to do: -

var executed=true;

while(executed)
{
var code="CODE:SET !ERRORIGNORE YES\n";
code+="YOUR CODE THAT YOU WANT TO RUN"\n;
code+="YOUR CODE THAT YOU WANT TO RUN"\n;
.
.
.
code+="YOUR CODE THAT YOU WANT TO RUN"\n;
if(iimPlay(code)<0)
execute=false;
}

I believe this should help solve your problem. If not, do share your code and the URL so it is possible to get help.
access2vivek
 
Posts: 35
Joined: Wed Dec 20, 2017 3:00 am


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 13 guests

-->