imacro在每次循环后将attr = id增加一位数

时间:2013-09-19 12:44:56

标签: loops increment imacros

imacro - 我需要在每个循环之后将ATTR=ID:增加一个

TAG POS=1 TYPE=SPAN ATTR=ID:ygtvlabelel92

ID:ygtvlabelel92在循环后必须为ygtvlabelel93并且ygtvlabelel94 ....等

2 个答案:

答案 0 :(得分:1)

set !var1 1
add !var1 {{!loop}}
TAG POS=1 TYPE=SPAN ATTR=ID:ygtvlabelel9{{!var1}}

答案 1 :(得分:0)

//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