The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
connect-to-ie.vbs
Jump to navigation
Jump to search
This example script connects to an already open instance of Internet Explorer with an active (open) iMacros Add-On. If it can not find one it starts Internet Explorer. It calls the macro Demo-Frame.iim.
Technically this script is exactly the same as a script that uses the iMacros Browser, but it invokes Internet Explorer with iimInit ("-ie").
Visual Basic Script:
Option Explicit Dim iim1, iret set iim1= CreateObject ("imacros") iret = iim1.iimInit ("-ie", FALSE) if iret < 0 then MsgBox ("For this example to work you must make sure that the IIM plugin is **open** (visible) before you close Internet Explorer. Then the IIM plugin is started automatically whenever IE starts and the Scripting Interface can connect to it.") iret = iim1.iimDisplay("Start demo") 'Run the first macro iret = iim1.iimPlay("Demo-Frame", 30) if iret < 0 Then MsgBox "Error in Macro#1: "+ cstr (iret) +iim1.iimGetLastError() End If iret = iim1.iimDisplay("Script completed.") MsgBox "Close Internet Explorer" iret = iim1.iimExit(1) if iret < 0 Then MsgBox "Error in Macro#1: "+ cstr (iret) +iim1.iimGetLastError() End If WScript.Quit(0)