我有一个javascript代码,首先在imacros中工作,但现在它不起作用。循环不播放。谁能告诉我为什么会发生这种情况。以下是代码。
请解决这个问题为什么现在这个javascript在imacros中不起作用。
var i, retcode;
\var report;
var macrolist = new Array();
/* Standard Demo Macros */
macrolist.push("Demo-Firefox/FillForm.iim");
macrolist.push("Demo-Firefox/Frame.iim");
macrolist.push("Demo-Firefox/Filter.iim");
macrolist.push("Demo-Firefox/Tabs.iim");
macrolist.push("Demo-Firefox/Javascript-Dialogs.iim");
macrolist.push("Demo-Firefox/SlideShow.iim");
macrolist.push("Demo-Firefox/TagPosition.iim");
/* Macros that save something and/or create logs */
macrolist.push("Demo-Firefox/Download.iim");
macrolist.push("Demo-Firefox/SaveAs.iim");
macrolist.push("Demo-Firefox/SavePDF.iim");
/* Macros that create reports */
macrolist.push("Demo-Firefox/Stopwatch.iim");
/* Macros that extract information */
macrolist.push("Demo-Firefox/ExtractAndFill.iim");
macrolist.push("Demo-Firefox/Extract.iim");
macrolist.push("Demo-Firefox/ExtractURL.iim");
macrolist.push("Demo-Firefox/ExtractRelative.iim");
iimDisplay("Start Self Test");
report = "Self-Test Report\n\n";
for (i = 0; i < macrolist.length; i++) {
iimDisplay("Step "+(i+1)+" of "+macrolist.length + "\nMacro: "+macrolist[i]);
retcode = iimPlay(macrolist[i]);
report += macrolist[i];
if (retcode < 0) {
report += ": "+iimGetLastError();
} else {
report += ": OK";
/* display the FIRST extracted item in report*/
s = iimGetLastExtract(1);
if ( s != "" ) report += ", Extract: "+s;
}
report += "\n";
}
iimDisplay("Test complete");
alert ( report );
答案 0 :(得分:0)
尝试安装最新的firefox 19并重新安装最新版本的imacros。
答案 1 :(得分:0)
var i, retcode;
\var report;
var macrolist = new Array();
var报告;有\它打破你的代码。