title: How do I make a loop off of this code for iMacros?
body: <p>So this is my code right now and as you can see this clearly is possible using a loop. The number between the bracket is what I want to change.</p>
  
  <p>How do I make a loop from here since I want to go to like 100 or higher instead of having to copy and paste and change the value?</p>
  
  <pre><code>EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type(1) MODIFIERS=shift
  EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type(2) MODIFIERS=shift
  EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type(3) MODIFIERS=shift
  EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type(4) MODIFIERS=shift
  EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type(5) MODIFIERS=shift
  </code></pre>
  
  <p>This is my new code I wrote for Javascript. </p>
  
  <pre><code>var test;
  
  test ="CODE:";
  test +="SET !ERRORIGNORE YES "+"\n";
  test +="URL GOTO=http://tppcrpg.net/create_trade.php?id=1 "+"\n";
  test +="EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type({{!loop}}) MODIFIERS=shift"
  
  for (var i = 1; i &lt; 10 ; i++)
  {
  test +="EVENT TYPE=CLICK SELECTOR=#CP&gt;OPTION:nth-of-type" + ({{String(i)}}) + "MODIFIERS=shift"
  }
  
  iimPlay(test)
  iimPlay("myMacro.iim")
  </code></pre>
  
  <p>Just wondering how to program it so that it can run with me going to the link and selecting from a list. </p>