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

Imacros loop through http links

Discussion in 'Black Hat SEO Tools' started by dgupster, Feb 14, 2013.

  1. dgupster

    dgupster Newbie

    Joined:
    Feb 13, 2013
    Messages:
    2
    Likes Received:
    0
    I am writing a script to loop through a bunch of keep links on a game. I have a csv file with all of the http links

    I would like to goto a random link in the csv file each time instead of one after the other.

    the script will log into one character, do a bunch of tasks including going to one of the links in the csv file
    then log out and into the next character,

    after logging into all of the characters it loops back to the start

    below is the code i have. It is work in that it will go to each new link in order.

    Can i put the "datasource_line {{loop}}" line in the goto url line?

    Can i use a random number generator to set !var1 to the random number, then use the !var1 in the url goto line?

    Can i use the !var in the {{!col1}} eg. url goto ={{!col{!var1}}}

    SET !ERRORCONTINUE YES


    CMDLINE !DATASOURCE C:\Users\guppy_000\Documents\invades.txt
    SET !LOOP 1
    SET !DATASOURCE_LINE {{!LOOP}}
    SET !DATASOURCE_COLUMNS 4
    TAB T=1


    wait seconds=5


    wait seconds=5
    URL GOTO={{!COL1}}
    'do some stuff
    URL GOTO={{!COL2}}
    'do some stuff
    URL GOTO={{!COL3}}
    'do some stuff
    URL GOTO={{!COL4}}
    'do some stuff

    Thanks in advance
     
    Last edited: Feb 14, 2013
  2. kvmcable

    kvmcable Supreme Member

    Joined:
    Dec 28, 2010
    Messages:
    1,355
    Likes Received:
    2,815
    Occupation:
    24 year business owner - old school dude
    Location:
    KFC - BW3
    Yes you can use a random number generator and set a var to that number. I use EVAL and here is some code to get you started

    ' SELECT RANDOM NUMBER BETWEEN 1-100
    SET !VAR1 EVAL("var randomNumber = Math.floor(Math.random() * 100) + 1; randomNumber;")
    SET !DATASOURCE_LINE {{!VAR1}}