我花了很多时间,我认为我的代码是正确的,但不知何故 iMacros 给出了一条错误消息
SyntaxError: missing ; before statement, line: 7 (Error code: 991)
我想,是因为POS={{n}}
基本上,我想一个一个地提取 10 个 txt 并用它来定位HREF
, EXTRACT
theHREF
和OPEN
它在不同TAB
的位置,但问题是TAG POS
不断变化。
这是代码
var macro1= "CODE:";
macro1 += "VERSION BUILD=8530828 RECORDER=FX" + "\n";
macro1 += "SET !ERRORIGNORE YES" + "\n";
macro1 += "SET !TIMEOUT_PAGE 60" + "\n";
macro1 += "TAB T=1" + "\n";
macro1 += "SET !LOOP 1" + "\n"; // I tried removing this part but that didn't help either
macro1 += "TAG POS={{n}} TYPE=SPAN ATTR=CLASS:"itemLabel fcb" EXTRACT=TXT" + "\n"; //this is the part that i don't seem to get
macro1 += "SET TITLE {{!EXTRACT}}" + "\n";
macro1 += "SET !EXTRACT NULL" + "\n";
macro1 += "TAG POS=1 TYPE=A ATTR=TITLE:"{{TITLE}}" EXTRACT=HREF" + "\n";
macro1 += "TAB OPEN" + "\n";
macro1 += "TAB T=2" + "\n";
macro1 += "URL GOTO={{!EXTRACT}}" + "\n";
macro1 += "SET !EXTRACT NULL" + "\n";
macro1 += "TAB T=1" + "\n";
macro1 += "TAB CLOSEALLOTHERS";
for (var i=1;i<=10;i++)
{
iimSet("n",i);
iimPlay(macro1);
}