Try this maybe:
for (var i = 0; i < 10; i++)
{
var macro = "CODE";
macro +="URL GOTO=https://mywebsite.com" + "\n";
macro +="SET !DATASOURCE infos.csv" + "\n";
macro +="SET !DATASOURCE_COLUMNS 5"" + "\n";
macro +="SET !LOOP 2" "\n";
macro +="SET !DATASOURCE_LINE" + i + "\n";
....
iimPlay(macro);
for (var j = 0; i < 10; j++)
{
var macro2 = "CODE";
macro2 += "TAG POS=" + j + "TYPE=I ATTR=TXT:Jump";
iimPlay(macro2);
}
}
So basically you define a macro string and then use iimPlay()
method to play it. Make sure you create a Javascript file and run it (press only Play button no Play Loop).
Every string should have "CODE:"
in it to start off. Then adding a new line after every line of iMacros code.
Pretty much for the {{LOOP}}
just change it to the loop variable.