我有这段代码:
VERSION BUILD=7601105 RECORDER=FX
SET !TIMEOUT_PAGE 10
SET !ERRORIGNORE YES
TAB T=1
CMDLINE !DATASOURCE tags.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !VAR1 {{!LOOP}}
'***** enter all hashtags and likes here
'1
URL GOTO=http://web.stagram.com/tag/{{!COL1}}/
WAIT SECONDS=5
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=2
查看所有链接是如何相同的,我想循环10次到同一网址中的下一个链接,而不是必须复制/粘贴TAG POS命令10次。
感谢!!!
答案 0 :(得分:5)
你不能用常规的imacros做这个,但你可以用javascript版本。像这样的东西:
var macro;
macro = "CODE:";
macro += "TAG POS={{i}} TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png" + "\n";
macro += "WAIT SECONDS=2" + "\n";
for(i=1;i<=10;i++){
iimSet("i",i);
iimPlay(macro);
}