How to automate Firefox with iimInit ("-fx")

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++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Re: How to automate Firefox with iimInit ("-fx")

by winxp4all on Tue Mar 22, 2011 9:29 pm

I've upgraded to Firefox 4.0 and Imacros for Firefox 7.2.0.6
I've run both iMacros scripting version 7.22.1254 and the version 7.3beta.
Neither of these scripting version works with Firefox 4.0
Here is the sample VBS script that you can use to test.
Code: Select all
Option Explicit
Dim iim1, iret, s
set iim1 = CreateObject ("imacros")
iret = iim1.iimInit("-fx")
s = "CODE: URL GOTO=http://getfirebug.com/firstrun#Firebug%201.6.2" + vbNewLine
s = s +  "TAG POS=1 TYPE=A ATTR=REL:bookmark EXTRACT=TXT" + vbNewLine
s = s +  "TAG POS=R1 TYPE=A ATTR=REL:bookmark EXTRACT=TXT"
iret = iim1.iimPlay(s)
MsgBox (iim1.iimGetLastExtract(1))
MsgBox (iim1.iimGetLastExtract(2))
MsgBox (iim1.iimGetLastExtract(0))
'
' Try to extract the whole body
'
s = "CODE: TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM"
iret = iim1.iimPlay(s)
s = iim1.iimGetLastExtract(1)
MsgBox(Len(s))
WScript.Quit(0)

Please run this script with -ie first and then -fx to see the differences.
winxp4all
 
Posts: 9
Joined: Tue Mar 08, 2011 1:09 am

Re: How to automate Firefox with iimInit ("-fx")

by misterX on Tue May 24, 2011 1:21 pm

We are having the same issue. iimInit seems to not work with Firefox 4, and instead starts the iMacros Browser. Can anyone look into this?
misterX
 
Posts: 11
Joined: Wed May 18, 2011 9:04 pm

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Tue May 24, 2011 11:14 pm

misterx,

Have you tired running the connect-to-firefox.vbs demo script that installs with iMacros (in the iMacros\Examples\Windows Scripting Host folder)? Does this script work? If not, what specific error codes/messages are you receiving?
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by sanfric on Sun Jul 10, 2011 9:47 am

What is the cause of this error ?

about:blank?authorizeAll=false&pipeUuid=ec2a4012_4e72_4df8_8394_52c721aec50a&creatorUuid=b67af849_f9c3_45da_a19b_8a6eb8e5a649

You say the problem is solved since version 7.2. Not for me. :| the only association that works is Imacros version 6.6.5 with Firefox 3.6; 18. I wish to upgrade but I have the above message: about.....

I want to open a Imacros from a winword macroVBA that includes the code :
Set iim1 = CreateObject("iMacros")
i = iim1.iimInit("-fx")
i = iim1.iimPlay("my imacro", 1)

my imacro works fine in Firefox directly.

Help please
sanfric
 
Posts: 24
Joined: Mon Dec 07, 2009 9:33 am

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Wed Jul 13, 2011 1:53 pm

sanfric wrote:What is the cause of this error ?

about:blank?authorizeAll=false&pipeUuid=ec2a4012_4e72_4df8_8394_52c721aec50a&creatorUuid=b67af849_f9c3_45da_a19b_8a6eb8e5a649

You say the problem is solved since version 7.2. Not for me. :| the only association that works is Imacros version 6.6.5 with Firefox 3.6; 18. I wish to upgrade but I have the above message: about.....

my imacro works fine in Firefox directly.

Help please
Hello sanfric,

Have you tried it with iMacros for Firefox 7.3.0.0 and the iMacros Scripting Edition 7.22 or newer? iMacros for Firefox 7.3.0.0 or newer is required to automate Firefox 5.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by sanfric on Sun Jul 17, 2011 9:02 am

Hi,
Now, I use Imacros for firefox 7.3.0.0 with Firefox 5. The script"connect-to-firefox.vbs" open a new instance empty and the cursor flashes in the address bar. It's all!

After,I see the message "Could not connect to a FIREFOX web browser" with an error code -4
sanfric
 
Posts: 24
Joined: Mon Dec 07, 2009 9:33 am

Re: How to automate Firefox with iimInit ("-fx")

by MattBell7 on Sun Jul 17, 2011 11:03 am

with only the free iMacros for firefox, i believe the only scripting interface you can use is the javascript one, you require a full iMacros scripting license to be able to use vbs.
MattBell7
 
Posts: 628
Joined: Thu Nov 26, 2009 4:07 am
Location: United Kingdom

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Mon Jul 18, 2011 4:04 am

Matt, you can still automate Firefox from a VBScript with the trial version of the iMacros Scripting Edition (we even provide the demo connect-to-firefox.vbs with the installation).

Sanfric, it sounds like something is still not installed correctly. What version of the iMacros Browser is installed? (Open the browser and the version number should be listed right in the window title, or use Help - About).
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by sanfric on Mon Jul 18, 2011 6:56 am

I use windows XP 3, Firefox 5, iMacros browser 7.36.1445 and Imacros for Firefox 7.3.0.0.
May be, I should do something in the registry ?

I wrote a few days ago that Imacros version 6.6.5 with Firefox 3.6.18 works fine
sanfric
 
Posts: 24
Joined: Mon Dec 07, 2009 9:33 am

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Mon Jul 18, 2011 8:32 am

sanfric wrote:I use windows XP 3, Firefox 5, iMacros browser 7.36.1445 and Imacros for Firefox 7.3.0.0.
Sanfric, I can setup this exact configuration on a remote test machine for you to see that it works. The problem is something specific to your system. If you would like access to the test system, please open a support ticket and reference this post.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by sanfric on Sat Jul 23, 2011 12:03 am

Hi,
I uninstalled my old versions of Firefox and Imacros. I installed the latest versions. Everything works fine again.
Exception: iimInit ("-fx", false)...which always opens a new instance. After several calls from winword macros in VBA, the screen is loaded. That's why I preferred that I just macros opens a new tab!
How to make iimInit ("-fx", false) opens a new tab?

Thanks
sanfric
 
Posts: 24
Joined: Mon Dec 07, 2009 9:33 am

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Mon Jul 25, 2011 12:25 pm

sanfric wrote:Everything works fine again.
Exception: iimInit ("-fx", false)...which always opens a new instance.
Really? Have you tried running the connect-to-firefox.vbs example in the iMacros\Examples\Windows Scripting Host folder? Just edit the script file first to comment out iimInit("-fx", True) and uncomment the line above with iimInit("-fx", False). Also, you may need to include the path in the iimPlay call:

i = iim1.iimPlay("Demo-Firefox\demo-fillform.iim", 60)

I opened Firefox then ran this script after making these changes and it successfully attached to the existing instance and ran the macro.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by sanfric on Mon Jul 25, 2011 11:34 pm

Hi,
Unfortunately, this does not work. The problem was discussed on the previous page
Re: How to automate Firefox with iimInit ("-fx")

Postby Tech Support on Tue Mar 08, 2011 2:03 pm
Thanks you for the system details. They look all ok to me.

1. iimInit("-fx",False) does not work, always starts a new Firefox session.


Yes, FALSE is not supported for Firefox. This parameter usually is not required for unattended automation. If you have a special use case that would require please let us know.


What can I do to open new tabs only with a vbs script running several times ?

Thanks
sanfric
 
Posts: 24
Joined: Mon Dec 07, 2009 9:33 am

Re: How to automate Firefox with iimInit ("-fx")

by Tom, Tech Support on Tue Jul 26, 2011 4:32 am

sanfric wrote:Yes, FALSE is not supported for Firefox. This parameter usually is not required for unattended automation. If you have a special use case that would require please let us know.
Maybe this was the case back in March, but my test yesterday confirmed that I can attach to an existing instance of Firefox with the latest versions and running the connect-to-firefox.vbs as a test.
sanfric wrote:What can I do to open new tabs only with a vbs script running several times ?
That functionality is currently not supported.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: How to automate Firefox with iimInit ("-fx")

by sanfric on Tue Jul 26, 2011 5:43 am

Yes, the script runs the first time I use it, but not twice.

Tom Wrote "
That functionality is currently not supported."


Do iOpus looking for a solution?

Thank you in advance for your work.
sanfric
 
Posts: 24
Joined: Mon Dec 07, 2009 9:33 am

PreviousNext

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 5 guests

-->