title: How to set a loop in iMacros?
body: <p>I have written a macro given below-</p>
  
  <pre><code>VERSION BUILD=844 RECORDER=CR
  URL GOTO=https://example.com/form.aspx
  WAIT SECONDS= 4
  
  EVENT TYPE=CLICK SELECTOR="HTML&gt;BODY&gt;FORM&gt;DIV:nth-of-type(4)&gt;DIV&gt;DIV:nth-of-type(3)&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(4)&gt;TABLE:nth-of-type(2)&gt;TBODY&gt;TR:nth-of-type(195)&gt;TD:nth-of-type(4)&gt;SPAN:nth-of-type(2)&gt;I" BUTTON=0
  WAIT SECONDS= 15
  EVENT TYPE=CLICK SELECTOR="HTML&gt;BODY&gt;FORM&gt;DIV:nth-of-type(4)&gt;DIV&gt;DIV:nth-of-type(3)&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(4)&gt;TABLE:nth-of-type(2)&gt;TBODY&gt;TR:nth-of-type(196)&gt;TD:nth-of-type(4)&gt;SPAN:nth-of-type(2)&gt;I" BUTTON=0
  WAIT SECONDS= 15
  EVENT TYPE=CLICK SELECTOR="HTML&gt;BODY&gt;FORM&gt;DIV:nth-of-type(4)&gt;DIV&gt;DIV:nth-of-type(3)&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(4)&gt;TABLE:nth-of-type(2)&gt;TBODY&gt;TR:nth-of-type(197)&gt;TD:nth-of-type(4)&gt;SPAN:nth-of-type(2)&gt;I" BUTTON=0
  WAIT SECONDS= 15
  EVENT TYPE=CLICK SELECTOR="HTML&gt;BODY&gt;FORM&gt;DIV:nth-of-type(4)&gt;DIV&gt;DIV:nth-of-type(3)&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(4)&gt;TABLE:nth-of-type(2)&gt;TBODY&gt;TR:nth-of-type(198)&gt;TD:nth-of-type(4)&gt;SPAN:nth-of-type(2)&gt;I" BUTTON=0
  WAIT SECONDS= 15
  EVENT TYPE=CLICK SELECTOR="HTML&gt;BODY&gt;FORM&gt;DIV:nth-of-type(4)&gt;DIV&gt;DIV:nth-of-type(3)&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(4)&gt;TABLE:nth-of-type(2)&gt;TBODY&gt;TR:nth-of-type(199)&gt;TD:nth-of-type(4)&gt;SPAN:nth-of-type(2)&gt;I" BUTTON=0
  WAIT SECONDS= 15
  </code></pre>
  
  <p>In each iteration of loop , only the value in 'TBODY>TR:nth-of-type(XXX)' changes. The value of XXX ranges from 1 to 150.
  How should I convert this into a loop so as to reduce lines of code and improve readibility.</p>
  
  <p>After a bit of research, I found that !LOOP function can be used in iMacros, but I'm unable to get around its syntax. Help me out, please. </p>