I've got the below script that works with IE(when changing iimInit() to "-ie") that starts a new macro session after each item of a loop. I can't for the life of me figure out how to make it start the scripting browser however. If I try to run it, it acts like nothing happens. Am I missing something obvious?
Option Explicit
dim iim1, iret
dim myname, mypath
dim startPos
dim endPos
dim pos
dim macroName
'
'
set iim1 = CreateObject("imacros")
myname=WScript.ScriptFullName
mypath = Left(myname, InstrRev(myname, "\"))
'Enter the name of your macro
macroname="post_to_my_site"
'Enter the start row in your CSV
startPos=1
'Enter the end row in your CSV
endPos=3
'
for pos = startPos To endPos
iret = iim1.iimInit()
iret = iim1.iimSet("loopVar", pos)
iret = iim1.iimPlay(mypath + macroName + ".iim")
if iret = -101 then
MsgBox "Script manually stopped"
iim1.iimExit()
WScript.Quit()
else
iim1.iimExit()
end if
next
iimInit() Won't run scripting interface
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: iimInit() Won't run scripting interface
Hello gmatch,
At a quick glance, I didn't see anything wrong with your code. What happens if you just run a short test script to launch a macro in the iMacros Browser?
Does this work for you? If no, can you manually open the iMacros Browser and successfully play the macro?
At a quick glance, I didn't see anything wrong with your code. What happens if you just run a short test script to launch a macro in the iMacros Browser?
Code: Select all
Dim im, ret
Set im = CreateObject("iMacros")
ret = im.iimInit()
ret = im.iimPlay ("Demo\FillForm.iim")
Regards,
Tom, iMacros Support
Tom, iMacros Support