问题
imacro - I need to increase ATTR=ID:
by one after each loop
TAG POS=1 TYPE=SPAN ATTR=ID:ygtvlabelel92
The ID: ygtvlabelel92
must be ygtvlabelel93
after loop and ygtvlabelel94
....etc
回答1:
set !var1 1
add !var1 {{!loop}}
TAG POS=1 TYPE=SPAN ATTR=ID:ygtvlabelel9{{!var1}}
回答2:
//this is the JavaScript code. You have to place this code inside .js file or it will not work
var macro;
macro ="CODE:";
macro +="TAG POS=1 TYPE=SPAN ATTR=ID:ygtvlabelel{{counter}}"+"\n";
//set the counter
var counter=92;
for(var i=0;i<=10;i++)
{
iimSet("counter",counter)
iimPlay(macro)
//increase counter
counter++;
}//end of i loop
来源:https://stackoverflow.com/questions/18894967/imacro-increase-attr-id-by-one-digit-after-every-loop