walandio
Supreme Member
- Jun 27, 2008
- 1,381
- 765
Hey there,
I am not really a coder, but I want to create an imacros using javascript. I would like to know how to loop an array in imacros.
What I want is to loop an Imacro function and choose different array everytime it loops.
Here is the code that I would like to create. This code works without error. But it doesn't work the way i want it. This code only choose the last array and doesn't even loop.
I hope someone can help me make this thing work..
thanks,
I am not really a coder, but I want to create an imacros using javascript. I would like to know how to loop an array in imacros.
What I want is to loop an Imacro function and choose different array everytime it loops.
Here is the code that I would like to create. This code works without error. But it doesn't work the way i want it. This code only choose the last array and doesn't even loop.
Code:
var warray = ['apple', 'banana', 'orange'];
var text = 'walandio';
for(var i = 0; i < warray.length; i++)
{
walandio = "CODE:";
walandio += "VERSION BUILD=8300326 RECORDER=FX" + "\n";
walandio += "TAB T=1" + "\n";
walandio += "TAG POS=1 TYPE=BUTTON ATTR=TXT:enter" + "\n";
walandio += "WAIT SECONDS=3" + "\n";
walandio += "TAG POS=1 TYPE=LI ATTR=TXT:" + warray[i] + "\n";
walandio += "WAIT SECONDS=3" + "\n";
walandio += "TAG POS=R1 TYPE=BUTTON ATTR=TXT:enter" + "\n";
walandio += "WAIT SECONDS=5" + "\n";
}
iimPlay(walandio);
I hope someone can help me make this thing work..
thanks,