Skip to content Skip to sidebar Skip to footer

Imacros Javascript Nested Loops In Firefox

I have 2 macros I need to run in Firefox. They both run perfectly as iim's but I need to get them to run together Macro1: It reads a text file with a number of links on it, loads

Solution 1:

iimPlay(macro1)

var link1=iimGetLastExtract();

var link2_array=newArray();

for(var i=0; i<50; i++)
{

iimPlay(macro2)
link2_array[i]=iimGetLastExtract();


}

Would something like this work for you?

To check if the link is extracted properly you can use this

iimPlay(macro)
var link=iimGetLastExtract();

if(link=="EANF")
{

//link is not there

}
else
{

//link is there

}

To change position of imacros command.

var macro;

macro ="CODE:";
macro +="TAG POS={{n}} TYPE=A ATTR=HREF:someurl.com EXTRACT=HREF";

for (var i=1;i<=10;i++)
{

iimSet("n",i)
iimPlay(macro)

}

Post a Comment for "Imacros Javascript Nested Loops In Firefox"