JavaScript

From iMacros
Jump to: navigation, search

Note: the sample below refers to using the Scripting Interface. It should not be mixed up with using the built-in JavaScript Scripting Interface as supported by the iMacros Firefox plugin.



You can access iMacros from any active scripting language. In Javascript please use:

 <html>
 <body> 
  
 <script type="text/javascript">
   <!--
   function runimacros() {
      var iim1 = new ActiveXObject("imacros");
      var iret
   
      iret = iim1.iimInit("-fx");
      iret = iim1.iimDisplay("This is a test");
      iret = iim1.iimPlay ("Demo-FillForm");
      iret = iim1.iimExit();
   }
   //-->
  </script>

 <a href="javascript:runimacros()">Click to run iMacros</font></a>
 </body>
 </html>

You must open this page in Internet Explorer because only IE supports the ActiveXObject command.

Activex.png

Imacros javascript.png

This will run iMacros locally on the client. iMacros can also run on the server. In this case you would typically use ASP, ASP.NET or PHP to start it.