iMacro - 在 TAG 命令中使用 XPATH - TAG 命令格式错误
iMacro - Using XPATH in TAG Command - Wrong Format of TAG Command
我在这个宏的第 4 行得到错误的 TAG 命令格式。奇怪的是,当我删除变量和 运行 TAG 行作为一个单独的宏时,它工作正常。我甚至删除了变量并用 1 代替它,但仍然显示相同的错误。有人可以帮忙吗?我到处都在寻找答案。
const L = "\n";
var pc;
var bret;
pc = 1;
bret = 1;
while (pc < 16 && bret > 0) {
iimSet("VAR1",pc)
bret = iimPlayCode("TAG XPATH=/html/body/form/div[3]/div[7]/div[1]/div[2]/div[3]/div[{{!VAR1}}]/div/div/div[1]/div[2]/div[1]/a" + L +
"WAIT SECONDS=3" + L +
"TAG POS=1 TYPE=DIV ATTR=ID:NavLink EXTRACT=TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblTitle EXTRACT:TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblPrice EXTRACT:TXT" + L +
"SCREENSHOT TYPE=PAGE FOLDER=* FILE="+pc + L +
"SAVEAS TYPE=EXTRACT FOLDER=* FILE=wassup.csv" + L +
"BACK");
pc++;
}
我自己想出来的。这是因为在 iimPlayCode 的第 4 行中提到了 EXTRACT:TXT 而它应该是 EXTRACT=TXT.
const L = "\n";
var pc;
var bret;
pc = 1;
bret = 1;
while (pc < 16 && bret > 0) {
iimSet("VAR1",pc);
bret = iimPlayCode("TAG XPATH=/html/body/form/div[3]/div[7]/div[1]/div[2]/div[3]/div[{{!VAR1}}]/div/div/div[1]/div[2]/div[1]/a" + L +
"WAIT SECONDS=3" + L +
"TAG POS=1 TYPE=DIV ATTR=ID:NavLink EXTRACT=TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblTitle EXTRACT=TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblPrice EXTRACT=TXT" + L +
"SCREENSHOT TYPE=PAGE FOLDER=* FILE="+pc + L +
"SAVEAS TYPE=EXTRACT FOLDER=* FILE=wassup.csv" + L +
"BACK");
pc++;
}
我在这个宏的第 4 行得到错误的 TAG 命令格式。奇怪的是,当我删除变量和 运行 TAG 行作为一个单独的宏时,它工作正常。我甚至删除了变量并用 1 代替它,但仍然显示相同的错误。有人可以帮忙吗?我到处都在寻找答案。
const L = "\n";
var pc;
var bret;
pc = 1;
bret = 1;
while (pc < 16 && bret > 0) {
iimSet("VAR1",pc)
bret = iimPlayCode("TAG XPATH=/html/body/form/div[3]/div[7]/div[1]/div[2]/div[3]/div[{{!VAR1}}]/div/div/div[1]/div[2]/div[1]/a" + L +
"WAIT SECONDS=3" + L +
"TAG POS=1 TYPE=DIV ATTR=ID:NavLink EXTRACT=TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblTitle EXTRACT:TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblPrice EXTRACT:TXT" + L +
"SCREENSHOT TYPE=PAGE FOLDER=* FILE="+pc + L +
"SAVEAS TYPE=EXTRACT FOLDER=* FILE=wassup.csv" + L +
"BACK");
pc++;
}
我自己想出来的。这是因为在 iimPlayCode 的第 4 行中提到了 EXTRACT:TXT 而它应该是 EXTRACT=TXT.
const L = "\n";
var pc;
var bret;
pc = 1;
bret = 1;
while (pc < 16 && bret > 0) {
iimSet("VAR1",pc);
bret = iimPlayCode("TAG XPATH=/html/body/form/div[3]/div[7]/div[1]/div[2]/div[3]/div[{{!VAR1}}]/div/div/div[1]/div[2]/div[1]/a" + L +
"WAIT SECONDS=3" + L +
"TAG POS=1 TYPE=DIV ATTR=ID:NavLink EXTRACT=TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblTitle EXTRACT=TXT" + L +
"TAG POS=1 TYPE=SPAN ATTR=ID:lblPrice EXTRACT=TXT" + L +
"SCREENSHOT TYPE=PAGE FOLDER=* FILE="+pc + L +
"SAVEAS TYPE=EXTRACT FOLDER=* FILE=wassup.csv" + L +
"BACK");
pc++;
}