Cant start Chrome browser from script

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
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
Post Reply
abrmhk
Posts: 6
Joined: Thu May 05, 2011 9:45 am

Cant start Chrome browser from script

Post by abrmhk » Tue Feb 05, 2019 12:40 pm

Hi
I run iMacros 10.4.28.1074 with the iMacros for Chrome File Access installed - on a Windows 2008R2 server. The Chrome browser installed is version 71.

I try to run the sample script connect_cr.vbs:
it opens a chrome browser but times out and says that it can not connect to a Chrome browser - error code -4.
If I try a more advanced vbs script:
-----
' iMacros Connect-To-Chrome Script
' (c) 2008-2015 iOpus/Ipswitch Inc.

Option Explicit
MsgBox ("This example script opens an instance of Chrome. For this script to work you need to have iMacros for *Chrome* installed.")

Dim iim1, iret, s, Macro1, UnikID

'Call macro with parameter <unikID>
If WScript.Arguments.Count = 2 Then
Macro1 = WScript.Arguments.Item(0)
UnikID = WScript.Arguments.Item(1)
Else
Wscript.Echo "Usage: start-cr-kakao.vbs <macro> <parameter>"
Wscript.Quit
End If

set iim1 = CreateObject ("iMacros")

'Start Chrome
'iret = iim1.iimInit ("-cr")
'iret = iim1.iimOpen ("-cr")
'iret = iim1.iimOpen ("-cr -runner")
iret = iim1.iimOpen("-cr -runner -crUserDataDir ""C:\Users\fnkpuc01\AppData\Local\Google\Chrome\User Data""",true)
'iret = iim1.iimOpen ("-cr -crUserDataDir ""C:\Users\fnkpuc01\AppData\Local\Google\Chrome\User Data""",true)
'iret = iim1.iimOpen ("-runner")
'iret = iim1.iimInit ("-ie")

if iret<0 then
Msgbox "Could not connect to a Chrome web browser."
end if

'Set user variable
iret = iim1.iimSet("UnikID",UnikID)

'Run the macro
iret = iim1.iimPlay(macro1, 60)

if iret<0 then
s = iim1.iimGetErrorText()
Msgbox "The Scripting Interface returned error code: "+cstr(iret)
end if

Msgbox "Press OK to close Chrome"

'Close Chrome again
'iret = iim1.iimExit(1)
iret = iim1.iimClose

WScript.Quit(iret)

-----
it opens the Chrome browser on this "URL": file:///C:/PROGRA~2/Ipswitch/iMacros/START~1.HTM?pipe=\\.\pipe\im-cr-de90eaa293afed4d67d22904a00db163.runner
but never runs the script and gives the same error messages as the sample script.

Mogens Hald Kristensen
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Cant start Chrome browser from script

Post by Tom, Tech Support » Tue Feb 19, 2019 11:41 am

Hi Mogens,

Sorry for the late reply. You need to use iMacros Enterprise v12 or later in order to script iMacros for Chrome|Firefox 10. See note #2 here.
Regards,

Tom, iMacros Support
dlowen
Posts: 4
Joined: Thu May 16, 2019 8:12 pm

Re: Cant start Chrome browser from script

Post by dlowen » Fri Jun 14, 2019 3:58 pm

This is the same question I had recently and it took a great deal of effort, posting here, calling support & sales to finally get this answer.
Perhaps a better error message to just tell us that an additional purchase is required.
It's actually the "iMacros for Chrome File Access" module which is needed and that cannot be used with the trial version.
Only with a licensed copy of iMacros Enterprise edition.
So effectively, there is no way to test iMacros/VBA/Chrome without spending $995 or getting a special trial version which sales was VERY KIND to allow me to use to pitch the solution to my client.

Given the number of Excel VBA coders out there in the universe who need to either push or pull data from web applications and Chrome is often the only supported browser for some apps, it would probably sell more copies of iMacros if this wasn't such a limitation.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Cant start Chrome browser from script

Post by Tom, Tech Support » Mon Jun 24, 2019 10:35 am

Hi dlowen,

Thanks for the feedback!
dlowen wrote:
Fri Jun 14, 2019 3:58 pm
It's actually the "iMacros for Chrome File Access" module which is needed and that cannot be used with the trial version.
Only with a licensed copy of iMacros Enterprise edition.
The File Access module for Chrome/Firefox works with a Personal, Professional, or Enterprise license. Users who are trialing the Enterprise edition can request an evaluation license via the Contact form on the main iMacros website in order to try the File Access module.
Regards,

Tom, iMacros Support
Post Reply