Google chrome 如何在iMacros中设置循环?

Google chrome 如何在iMacros中设置循环?,google-chrome,imacros,Google Chrome,Imacros,我已经写了下面给出的宏- VERSION BUILD=844 RECORDER=CR URL GOTO=https://example.com/form.aspx WAIT SECONDS= 4 EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:

我已经写了下面给出的宏-

VERSION BUILD=844 RECORDER=CR
URL GOTO=https://example.com/form.aspx
WAIT SECONDS= 4

EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(195)>TD:nth-of-type(4)>SPAN:nth-of-type(2)>I" BUTTON=0
WAIT SECONDS= 15
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(196)>TD:nth-of-type(4)>SPAN:nth-of-type(2)>I" BUTTON=0
WAIT SECONDS= 15
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(197)>TD:nth-of-type(4)>SPAN:nth-of-type(2)>I" BUTTON=0
WAIT SECONDS= 15
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(198)>TD:nth-of-type(4)>SPAN:nth-of-type(2)>I" BUTTON=0
WAIT SECONDS= 15
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type(199)>TD:nth-of-type(4)>SPAN:nth-of-type(2)>I" BUTTON=0
WAIT SECONDS= 15
在循环的每次迭代中,只有类型(XXX)的“TBODY>TR:nth”中的值发生变化。XXX的值范围为1到150。 如何将其转换为循环,以减少代码行数并提高可读性


经过一番研究,我发现了!循环函数可以在iMacros中使用,但我无法绕开它的语法。请帮帮我

尝试反复播放此宏
(当前:1最大值:150,“播放循环”按钮):


代码可以工作,但在循环的每次迭代中都会等待4秒钟。由于example.com链接在整个循环执行过程中仅被访问一次,我们能否以某种方式修改它,使其在第一次访问链接时仅等待4秒钟?
SET url https://example.com/form.aspx
SET url EVAL("({{!LOOP}} == 1) ? '{{url}}' : 'javascript: undefined;';")
URL GOTO={{url}}
SET firstWait EVAL("({{!LOOP}} == 1) ? '4' : '0';")
WAIT SECONDS={{firstWait}}

EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(4)>TABLE:nth-of-type(2)>TBODY>TR:nth-of-type({{!LOOP}})>TD:nth-of-type(4)>SPAN:nth-of-type(2)>I" BUTTON=0
WAIT SECONDS=15