Cannot find macro error

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
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
Post Reply
fourscore
Posts: 2
Joined: Fri Jun 19, 2020 8:27 pm

Cannot find macro error

Post by fourscore » Fri Jun 19, 2020 8:38 pm

iMacros Sidebar for Internet Explorer (x64) Version 12.6.505.4525
Windows 10 English
Chrome Version 83.0.4103.106 (Official Build) (64-bit)

I run the following script from a vbs file.
The browser and imacros open, but I immediately get the following error message with error code -1110:
"Cannot find macro: URL GOTO=http://www.google.com.iim (-1110)"

What's going on?
------

Option Explicit
Dim iim1, iret

set iim1= CreateObject ("imacros")
iret = iim1.iimOpen ("-ie")

iret = iim1.iimPlay("URL GOTO=http://www.google.com", 20)
if iret < 0 Then
MsgBox "Error code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetErrorText()
End If

iim1.iimClose(30)
WScript.Quit(iret)
Last edited by fourscore on Sat Jun 20, 2020 7:16 am, edited 1 time in total.
chivracq
Posts: 9763
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Cannot find macro error

Post by chivracq » Fri Jun 19, 2020 9:04 pm

fourscore wrote:
Fri Jun 19, 2020 8:38 pm
I run the following script from a vbs file.
The browser and imacros open, but I immediately get the following error message with error code -1110:
"Cannot find macro: URL GOTO=http://www.google.com.iim (-1110)"

What's going on?
------

Code: Select all

Option Explicit
Dim iim1, iret

set iim1= CreateObject ("imacros")
iret = iim1.iimOpen ("-ie")

iret = iim1.iimPlay("URL GOTO=http://www.google.com", 20)
if iret < 0 Then
   MsgBox "Error code: "+cstr(iret) + VbCrLf + "Error Text: "+iim1.iimGetErrorText()
End If

iim1.iimClose(30)
WScript.Quit(iret)

(F)CIM...! :mrgreen: (Read my Sig...)
... Maybe an Idea to read the Forum Rules when you join a Tech Forum..., for some missing Tech Info to include when you open a Thread... :idea:

But anyway..., yep normal, and for all Versions, 'iimPlay()' expects a Macro defined by its Filename (Extension not required), or an on-the-fly Macro declared as a String, but the on-the-fly Macro needs to start with "CODE:" at the Beginning... :!:

Or you can use 'iimPlayCode()' instead, which already includes the "CODE:" Command... :idea:
=> I would expect this one to work:

Code: Select all

iret = iim1.iimPlayCode("URL GOTO=http://www.google.com", 20)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
fourscore
Posts: 2
Joined: Fri Jun 19, 2020 8:27 pm

Re: Cannot find macro error

Post by fourscore » Sat Jun 20, 2020 7:24 am

Sorry for the omission of the details. Remembered I forgot to put them in a second after submitting, and then it took time till approval in which I was not able to edit. Fixed.

And yes, it worked! Somehow I missed this in the documentation.
chivracq
Posts: 9763
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Cannot find macro error

Post by chivracq » Sat Jun 20, 2020 3:26 pm

fourscore wrote:
Sat Jun 20, 2020 7:24 am
Sorry for the omission of the details. Remembered I forgot to put them in a second after submitting, and then it took time till approval in which I was not able to edit. Fixed.

And yes, it worked! Somehow I missed this in the documentation.

OK, glad to hear it works..., and Thanks for including your FCI..., and Mod Approval is/was only needed for your 1st Post (against Spammers and Fake Users), now you can post and edit your Posts "freely"...

Code: Select all

iMacros Sidebar for Internet Explorer (x64) Version 12.6.505.4525
Windows 10 English
Chrome Version 83.0.4103.106 (Official Build) (64-bit)
Not really "relevant" for this Thread, as 'iimPlayCode()' was an "easy" Solution, and a bit Version-independent (well, since that Command has been implemented...), but might play a Role for "a next time", ah-ah...! ... As some Info would still be missing from your FCI...

"iMacros Sidebar for Internet Explorer (x64) Version 12.6.505.4525"
=> OK, => iMacros for IE v12.6, + 'Free'/'PE' would be missing. ('PE' = 'Personal Edition')
+ IE Version missing, could be deducted from Windows Build, but "Windows 10 English" doesn't contain that Info...

Using '.vbs' Script, => must be using iMB + 'SI' ('Scripting Interface'), not mentioned in FCI, => will be iMB v12.6, + 'Trial'/'Pro'/'Enterprise' is missing, will be 'Trial'/'Ent' if using 'SI', => will probably be 'Trial' or would have contacted @TechSup "directly" instead of posting on the Forum...

"Chrome Version 83.0.4103.106 (Official Build) (64-bit)"
=> OK, => CR83, but iMacros for CR Version is missing, => will be v10.0.5, + 'Free'/'PE', not mentioned..., if iMB 'Pro'/'Ent' => 'PE', if iMB 'Trial' => 'Free'.

=> As you can see, I can "deduct" most of the Info pertaining to your FCI, but it is not "completely straightforward", it becomes quickly some "Detective Work", ah-ah...! :wink:

And the Info about CR83 was not "really" needed (in this Case) as from "iimOpen[ ]("-ie")" (watch out for unnecessary Spaces in your Script/Commands btw...), you are using 'SI'/'.vbs' with IE and not with CR...

>>>

But OK, "enjoy" iMacros..., and "dare to shout" if you need some Help... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply