imacros: Press ALL (number varies) buttons within a given frame

自作多情 提交于 2019-12-12 01:27:20

问题


FF 42.0 Imacros for FF BUILD=8940826 Early 2008 8 core MacPro OSX 10.8.2

Looking to press however many buttons happen to be present within a given frame. I suppose I could just loop up to some unreasonably large number and ignore errors, but that seems clumsy to me.

So, if a button press for the first button in the frame looks like this:

TAG Pos=1 TYPE=Button ATTR=DATA-LOG-CLICK:add-button

and each one after that varies only by the TAG Pos#, is there a way to search for the highest TAG Pos#, then press every button up to that last one? If this is a well known item, I must just be lacking the proper search term.


回答1:


   // What you asked for can be done with JS.

    var macroClick;

    macroClick ="CODE:";
    macroClick +="TAG Pos=1 TYPE=Button ATTR=DATA-LOG-CLICK:add-button";

    var macroClickTest;

    macroClickTest="CODE:";
    macroClickTest +="TAG Pos=1 TYPE=Button ATTR=DATA-LOG-CLICK:add-button CONTENT=EVENT:MOUSEOVER";


    var pos=1;

    while(true)
    {

    iimSet("n",pos)
    if(iimPlay(macroClickTest)<0)
    {

    pos--;

    iimPlay(macroClick)
    }
    pos++;
    }


来源:https://stackoverflow.com/questions/33586725/imacros-press-all-number-varies-buttons-within-a-given-frame

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!