Ruby

From iMacros
Jump to: navigation, search

The iMacros Scripting Interface can be used from any programming or script language via its standard Windows COM object. The following example shows you how to call this interface from Ruby. The script initializes the Scripting Interface and calls a macro with name "DownloadReport".

   require 'win32ole'
   iim1 = WIN32OLE.new('imacros')
   i = iim1.iimInit 
   i = iim1.iimSet("-var_loginname", "tom@iopus.com")
   i = iim1.iimDisplay("This is a test")
   i = iim1.iimPlay("DownloadReport")

(Sample provided by ryuuguu in our user forum. Here's the Posting)