How can i set loop iMacros by Javascript?

后端 未结 4 1848
别那么骄傲
别那么骄傲 2021-01-22 22:48

1) I can\'t add set loop imacros by javascript, How can i add it ?

var macro;
    macro =  \"CODE:\";
    macro +=  \"VERSION BUILD=8011895\" + \"\\n\"; 
    mac         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-22 23:22

    You have to write macro like this

    var macro;
    
    macro ="CODE:";
    macro +="TAG POS={{i}} TYPE=SPAN ATTR=TITLE:link"+"\n";
    
    ///The triggering part
    
    for (var i=1;i<10;i++)
    {
    
    iimSet("i",i)
    iimPlay(macro)
    }
    

    Since you example was kind of unclear I have to say that this command might not work.

    TAG POS={{i}} TYPE=SPAN ATTR=TITLE:link
    

    Instead of word link replace it with * which means any character and then it can work

    TAG POS={{i}} TYPE=SPAN ATTR=TITLE:*
    

    Also in the macro you can write like this

    TAG POS={{variable}} TYPE=SPAN ATTR=TITLE:*
    

    But in the iimSet part it has be like this.

    iimSet("variable",i)
    

提交回复
热议问题