title: 1. How to detect a keystoke? 2.How to skip a comand line?
body: <p>I have iMacros on FireFox. This is a .js file that I can't get it to work.</p>
  
  <p>It gives me this error <code>SyntaxError: syntax error, line NaN (Error code: -991)</code></p>
  
  <p>All my other .js files work just fine.</p>
  
  <p>If someone can help me I would appreciate it a lot.</p>
  
  <p>Once its working, I need-it to listen to a specific keystroke "numpad 0" wich is Code 96 and run macro07. Then, if marcro02 - macro05 is not playable/clickable because the button is not their, then skip the rest of the macros and play macro06.</p>
  
  <p>In advance, I would like to say: Thank-you very much...</p>
  
  <pre><code>for( i = 0; i &lt; 1000000; i++){
  
      var macro;
  
      var i, retcode, errtext;
  
      var macro01;
  
      var macro02;
  
      var macro03;
  
      var macro04;
  
      var macro05;
  
      var macro06;
  
      var macro07;
  
      macro = "VERSION BUILD=8510617 RECORDER=FX" + " \n ";
  
      macro += "SET !ERRORIGNORE YES" + " \n ";
  
      macro += "SET !TIMEOUT_PAGE 15" + " \n ";
  
      macro += "TAB T=1" + " \n ";
  
      macro += "WAIT SECONDS=1" + " \n ";
  
      macro += "EVENT TYPE=CLICK SELECTOR="#game_content&gt;DIV:nth-of-type(4)&gt;A:nth-of-type(1)" BUTTON=0" + " \n ";
  
      macro += "WAIT SECONDS=1" + " \n ";
  
      macro01 += "CODE:";
  
      macro01 += "EVENT TYPE=CLICK SELECTOR="#game_content&gt;DIV:nth-of-type(4)&gt;A:nth-of-type(2)" BUTTON=0" + " \n ";
  
      macro01 += "WAIT SECONDS=1" + " \n ";
  
      macro02 += "CODE:";
  
      macro02 += "EVENT TYPE=CLICK SELECTOR="#game_content&gt;DIV:nth-of-type(4)&gt;A:nth-of-type(3)" BUTTON=0" + " \n ";
  
      macro02 += "WAIT SECONDS=1" + " \n ";
  
      macro03 += "CODE:";
  
      macro03 += "EVENT TYPE=CLICK SELECTOR="#game_content&gt;DIV:nth-of-type(4)&gt;A:nth-of-type(4)" BUTTON=0" + " \n ";
  
      macro03 += "WAIT SECONDS=1" + " \n ";
  
      macro04 += "CODE:";
  
      macro04 += "EVENT TYPE=CLICK SELECTOR="#game_content&gt;DIV:nth-of-type(4)&gt;A:nth-of-type(5)" BUTTON=0" + " \n ";
  
      macro04 += "WAIT SECONDS=1" + " \n ";
  
      macro05 += "CODE:";
  
      macro05 += "EVENT TYPE=CLICK SELECTOR="#game_content&gt;DIV:nth-of-type(4)&gt;A:nth-of-type(6)" BUTTON=0" + " \n ";
  
      macro05 += "WAIT SECONDS=1" + " \n ";
  
      macro06 += "CODE:";
  
      macro06 += "TAG POS=1 TYPE=A ATTR=TXT:Next" + " \n ";
  
      macro06 += "WAIT SECONDS=0.5" + " \n ";
  
      retcode = iimPlay(macro)
  
      macro07 += "CODE:";
  
      macro07 += "WAIT SECONDS=20" + " \n ";
  
      macro07 += "BACK" + " \n ";
  
      macro07 += "WAIT SECONDS=1" + " \n ";
  
      macro07 += "BACK" + " \n ";
  
      macro07 += "WAIT SECONDS=1" + " \n ";
  
      macro07 += "BACK" + " \n ";
  
      macro07 += "WAIT SECONDS=1" + " \n ";
  
      retcode = iimPlay(macro)
  
  
  }
  </code></pre>