title: How to use JavaScript in imacros?
body: <p>I can't figure out how to use imacros with JavaScript. I have looked at their Help, have seen countless examples here on Stack Overflow, but don't know what am missing. It has not been explained clearly anywhere.</p>
  
  <p>Here is what I tried:</p>
  
  <ol>
  <li><p>Used the example explained in their help file here:
  <a href="http://wiki.imacros.net/JavaScript" rel="nofollow noreferrer">http://wiki.imacros.net/JavaScript</a></p>
  
  <p>But nothing happens when I click the '<code>Click Here to Run</code>' link (even in IE with ActiveX). NOTE: I don't have imacros for IE - the example shown above has image of the macro start in IE, but run in Firefox. And no further explanation..</p></li>
  <li><p>Tried to import a JS file into imacros, but it doesn't seem to be working for me. </p></li>
  </ol>
  
  <p>When I use code like the following:</p>
  
  <pre><code>var macro;
  macro = "CODE:";
  macro += "XXXXXX" + "\n";
  macro += "XXXXXX" + "\n";
  
  ....
  iimPlay(macro);
  </code></pre>
  
  <p>It says: </p>
  
  <pre><code>"Error -1100: Unknown command: VAR at line: 1"
  </code></pre>
  
  <ol start="3">
  <li>Tried to use the above inside a script tag of an HTML page, &amp; load the functions on page-load/click. But that doesn't work either.</li>
  </ol>
  
  <p>What am I doing wrong, and what do I need to do?</p>
  
  <p>Soon after I posted this, I think I got it to work for a while. I was able to open a JS file which opened a URL. So I  had deleted the Q. But now it isn't working again, and I can't figure out why.. Can somebody help?</p>
  
  <p>Basically I am having the exact same problem as this person here:
  <a href="https://stackoverflow.com/questions/21168974/javascript-and-imacro-to-open-google-com">Javascript and Imacro to Open Google.com</a> I get the same 'unknown command: var' as him. And their question remains unresolved too.</p>