iMacro 在 JS 循环中跳过 iimPlay
iMacro skipping iimPlay in JS Loop
我的 macro js 代码在这里:
var doi1 = "CODE:";
doi1 += "SET !DATASOURCE links.csv" + "\n";
doi1 += "SET !DATASOURCE_COLUMNS 5" + "\n";
doi1 += "SET !DATASOURCE_LINE {{l}}" + "\n";
doi1 += "URL GOTO={{!COL1}}" + "\n";
doi1 += "WAIT SECONDS = 3" + "\n";
var doi2 = "CODE:";
doi2 += "SET !DATASOURCE links.csv" + "\n";
doi2 += "SET !DATASOURCE_COLUMNS 5" + "\n";
doi2 += "SET !DATASOURCE_LINE {{l}}" + "\n";
doi2 += "URL GOTO={{!COL2}}" + "\n";
doi2 += "WAIT SECONDS = 3" + "\n";
for(l=1;l<5;l++){
iimSet("l",l);
iimPlay(doi1);
iimPlay(doi2);
}
当我 运行 这只循环第 1 列的 url,似乎 macro 跳过了第二个 iimPlay。
这是为什么?请帮助我。
尝试把循环写成这样:
for(l = 1; l < 5; l++) {
iimSet("l",l);
iimPlay(doi1);
iimSet("l",l);
iimPlay(doi2);
}
我的 macro js 代码在这里:
var doi1 = "CODE:";
doi1 += "SET !DATASOURCE links.csv" + "\n";
doi1 += "SET !DATASOURCE_COLUMNS 5" + "\n";
doi1 += "SET !DATASOURCE_LINE {{l}}" + "\n";
doi1 += "URL GOTO={{!COL1}}" + "\n";
doi1 += "WAIT SECONDS = 3" + "\n";
var doi2 = "CODE:";
doi2 += "SET !DATASOURCE links.csv" + "\n";
doi2 += "SET !DATASOURCE_COLUMNS 5" + "\n";
doi2 += "SET !DATASOURCE_LINE {{l}}" + "\n";
doi2 += "URL GOTO={{!COL2}}" + "\n";
doi2 += "WAIT SECONDS = 3" + "\n";
for(l=1;l<5;l++){
iimSet("l",l);
iimPlay(doi1);
iimPlay(doi2);
}
当我 运行 这只循环第 1 列的 url,似乎 macro 跳过了第二个 iimPlay。
这是为什么?请帮助我。
尝试把循环写成这样:
for(l = 1; l < 5; l++) {
iimSet("l",l);
iimPlay(doi1);
iimSet("l",l);
iimPlay(doi2);
}