语法错误 - 在语句之前丢失

时间:2014-07-10 17:26:46

标签: javascript macros syntax imacros

您好我试图在iMacros中运行此javascript:

macro +=  "VERSION BUILD=7601105 RECORDER=FX" + "\n";
macro += "SET !ERRORIGNORE YES"
macro +=  "URL GOTO=http://siteadress.com/index.html" + "\n"; 
var check =  "CODE:";
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"
check+=  "FRAME F={{i}}" + "\n"; 
check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n"; 
for(i=1;i<=15;i++){
iimSet("i",i);
iimPlay(check);}$
macro += "WAIT SECONDS=2"

我收到错误语法错误 - 在语句之前丢失。你能帮我解决一下吗?它必须设置错误忽略,转到页面地址,找到帧号,单击按钮并等待2秒。

1 个答案:

答案 0 :(得分:1)

如果你看一下SO的语法高亮,问题应该是显而易见的。在这样的所有陈述中都有一个额外的引用:

check+=  ""TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n";

应该是:

check+=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!" + "\n";

在最后也没有必要使用连接来添加换行符,所以它可以只是:

check+=  "TAG POS=1 TYPE=SPAN ATTR=TXT:Lubię<SP>to!\n";