How to start the imacro from start

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 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
new movies
Posts: 44
Joined: Thu May 26, 2011 8:14 pm

How to start the imacro from start

Post by new movies » Mon Mar 17, 2014 4:05 pm

Code: Select all

  
var ret;

for (var i = 1; i <= 99999999; i++) {
  iimPlay("google")
  iimPlay("new")
   // 1) search for the word in source of the page i run it
   ret = iimPlay('CODE:SET !TIMEOUT_STEP 1\nSET !TIMEOUT_STEP 1\nSEARCH SOURCE=TXT:"xyz" IGNORE_CASE=YES');
 
   // 2)if it find the word to play zzz
   if (ret == 1) {   // Text was found
      ret = iimPlay("startmacro from beginning");
  
  } 

  
}
i want to start the macros from step 1 if it found the word xyz
how to do this.
thnks
chivracq
Posts: 8928
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to start the imacro from start

Post by chivracq » Tue Mar 18, 2014 8:08 am

I don't check Scripts when the Configuration with all Versions (iMacros + Browser + OS) is not mentioned...
It's not the 1st time you ask Questions on the Forum, you should know... (And even if it was the 1st time, that means you never read the Forum Rules...)

But a general Answer to your "i want to start the macros from step 1" Question means that your Script is badly designed and that you need an extra Loop in your .js Script... that you may want to control with 'break' and 'continue'...:
http://www.tutorialspoint.com/javascrip ... ontrol.htm
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply