1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iMacros Question - need help

Discussion in 'Black Hat SEO Tools' started by Ming the Merciless, Dec 27, 2013.

  1. Ming the Merciless

    Ming the Merciless Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 30, 2012
    Messages:
    680
    Likes Received:
    820
    Location:
    United States
    I have an iMacros script with 30 lines of code/commands. I ONLY want to loop the last line, not the entire script (I want to loop it 500 times). How to do this without repeating the entire script over and over (I like to track the number of loops have gone on)? I have looked into !LOOP but I am coming up with nothing. Thanks in advance guys (and gals)!
     
  2. OrangeNRG

    OrangeNRG Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 10, 2012
    Messages:
    366
    Likes Received:
    229
    You can always copy and paste as a last resort. I'm not sure of the proper way of doing it though.
     
  3. nikchaing

    nikchaing Jr. VIP Jr. VIP UnGagged Attendee

    Joined:
    Apr 24, 2013
    Messages:
    622
    Likes Received:
    689
    Location:
    Florida
    Can you give us some details?
     
  4. Vonais

    Vonais Power Member

    Joined:
    Oct 14, 2013
    Messages:
    631
    Likes Received:
    336
    Occupation:
    IMer, student.
    Location:
    My room
    Bleh, in java this would be pretty simple, dunno bout Imacros. Mind posting your script here so we can see what you're doing? As someone stated before, copy pasting is always a good option if it is only one line of code...
     
  5. 45415

    45415 Junior Member

    Joined:
    Feb 5, 2009
    Messages:
    194
    Likes Received:
    92
    You can use Javascript Scripting Interface.

    The following code will open google.com once, then open yahoo.com 3 times. It will also display the current loop number.
    Code:
    var macro;
    macro =  "CODE:";
    macro +=  "URL GOTO=http://google.com" + "\n";
    
    
    var macro2;
    macro2 =  "CODE:"; 
    macro2 +=  "URL GOTO=http://yahoo.com" + "\n";
    
        
    iimPlay(macro);
    
    for(var i=1;i<=3;i++) {
        iimDisplay(i);
        iimPlay(macro2);    
    }
    
    
    
    Forgot to mention that you should save this code in a file using .js extension, not .iim.
     
    • Thanks Thanks x 1
    Last edited: Dec 27, 2013
  6. Ming the Merciless

    Ming the Merciless Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 30, 2012
    Messages:
    680
    Likes Received:
    820
    Location:
    United States
    Thanks for the responses guys. I do not want to post the macro in public for obvious reasons (will give away the site). I need to look into it further but it looks like 45415 (cool name btw) helped me out tons. Thanks again.....
     
  7. luiphe88

    luiphe88 Newbie

    Joined:
    Dec 26, 2013
    Messages:
    1
    Likes Received:
    0
    Thank you very much