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
Difference between revisions of "connect-to-iimrunner.vbs"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
MsgBox(message) | MsgBox(message) | ||
− | i = iim1. | + | i = iim1.iimOpen("-runner") |
if i = -6 or i = - 1 then | if i = -6 or i = - 1 then | ||
Line 38: | Line 38: | ||
i = iim1.iimPlay(mypath & "Macros\Wsh-Start.iim") | i = iim1.iimPlay(mypath & "Macros\Wsh-Start.iim") | ||
− | msgbox ("Demo completed. Result: " & iim1. | + | msgbox ("Demo completed. Result: " & iim1.iimGetErrorText& VBNewLine &"Press OK to close the iMacros browser.") |
− | iim1. | + | iim1.iimClose |
WScript.Quit(i) | WScript.Quit(i) | ||
Wsh-Start.iim macro | Wsh-Start.iim macro | ||
− | TAB T=1 | + | <nowiki> |
− | + | TAB T=1 | |
− | + | TAB CLOSEALLOTHERS | |
− | + | URL GOTO=http://demo.imacros.net/Automate/ | |
− | + | TAG POS=1 TYPE=A ATTR=TXT:*Testform1* | |
− | + | TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:name CONTENT=Tom<SP>Tester | |
− | + | TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:food CONTENT=$Pizza | |
− | + | TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:drink CONTENT=$Coke | |
− | + | TAG POS=1 TYPE=INPUT:RADIO FORM=ID:demo ATTR=ID:small&&VALUE:small CONTENT=YES | |
− | + | TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=ID:dessert CONTENT=%ice<SP>cream:%apple<SP>pie | |
− | + | TAG POS=1 TYPE=INPUT:RADIO FORM=ID:demo ATTR=NAME:Customer CONTENT=YES | |
+ | TAG POS=1 TYPE=INPUT:RADIO FORM=ID:demo ATTR=NAME:Customer&&VALUE:Not_yet CONTENT=YES | ||
+ | </nowiki> |
Revision as of 14:00, 19 October 2012
This example script starts the iMacros Browser via via the iimRunner.exe tool. It allows you to run the iMacros Browser (or Internet Explorer) under the user that iimRunner.exe runs under, and not the user of the calling application.
You can test this by starting iimRunner.exe as a different user using the Windows "Run As" command from the context menu. Once start, imacros.exe will run under the same user account.
Visual Basic Script:
' iMacros Connect-To-iimRunner Script ' (c) 2008-2010 iOpus Software Option Explicit Dim iim1, i set iim1 = CreateObject ("imacros") '**** ' find current folder Dim myname, mypath myname = WScript.ScriptFullName mypath = Left(myname, InstrRev(myname, "\")) Dim message message = "This script connects to iimRunner to start the iMacros Browser." message = message + " Use this technology for example to control the iMacros Browser from ASP, ASP.NET or PHP accounts." MsgBox(message) i = iim1.iimOpen("-runner") if i = -6 or i = - 1 then msgbox ("iimRunner ist not running. Please start iimRunner.exe first. You find this file in the iMacros program directory.") WScript.Quit(i) end if if i = -7 then msgbox ("The max. number of allowed iMacros instances is reached. You can change this limit in the simple.xml file in the iMacros directory.") WScript.Quit(i) end if i = iim1.iimPlay(mypath & "Macros\Wsh-Start.iim") msgbox ("Demo completed. Result: " & iim1.iimGetErrorText& VBNewLine &"Press OK to close the iMacros browser.") iim1.iimClose WScript.Quit(i)
Wsh-Start.iim macro
TAB T=1 TAB CLOSEALLOTHERS URL GOTO=http://demo.imacros.net/Automate/ TAG POS=1 TYPE=A ATTR=TXT:*Testform1* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:name CONTENT=Tom<SP>Tester TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:food CONTENT=$Pizza TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:drink CONTENT=$Coke TAG POS=1 TYPE=INPUT:RADIO FORM=ID:demo ATTR=ID:small&&VALUE:small CONTENT=YES TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=ID:dessert CONTENT=%ice<SP>cream:%apple<SP>pie TAG POS=1 TYPE=INPUT:RADIO FORM=ID:demo ATTR=NAME:Customer CONTENT=YES TAG POS=1 TYPE=INPUT:RADIO FORM=ID:demo ATTR=NAME:Customer&&VALUE:Not_yet CONTENT=YES