Imacros JavaScript for循环无法满足所需条件

时间:2016-12-22 12:04:04

标签: loops imacros

嗨我想宣传一条消息并询问该值并从该号码开始循环并以200结束我在imacros中使用java scrpt with firefox

**

var macro;
    macro ="CODE:";
    macro +="VERSION BUILD=5301016 RECORDER=CR";
    macro +="TAG POS={{i}} TYPE=I ATTR=CLASS:fa<SP>fa-hand-o-up<SP>custom&&TXT:";
    macro +="WAIT SECONDS= 35";
    PROMPT "Please enter value" !n
    for (var i=n;i<200;i++)
    {
        iimset("i",i)
        iimPlay(macro)
    }

**

1 个答案:

答案 0 :(得分:0)

我纠正了你的剧本。试试吧:

var macro = "TAG POS={{i}} TYPE=I ATTR=CLASS:fa<SP>fa-hand-o-up<SP>custom&&TXT:" + "\n";
macro +="WAIT SECONDS=35";

var n = parseInt(prompt("Please enter value"));
for (i = n; i <= 200; i++) {
    iimSet("i", i);
    iimPlayCode(macro);
}