imacro increase attr=id by one digit after every loop

主宰稳场 提交于 2019-12-11 02:48:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!