Opening up Firefox instead of IE

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
clickfast
Pro Scripter
Posts: 58
Joined: Wed May 23, 2007 12:04 am

Opening up Firefox instead of IE

Post by clickfast » Fri Jul 06, 2007 8:08 pm

I have the following functioning code, but wish to open up firefox versus IE. Any suggestions?

VBStart
Sub OpenPage(URL,Wait)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL

do while IE.Busy and Wait
loop
End Sub
VBEND

VBRun>OpenPage,http:\\www.mjtnet.com,1

clickfast
Pro Scripter
Posts: 58
Joined: Wed May 23, 2007 12:04 am

Post by clickfast » Mon Jul 09, 2007 7:56 pm

You mean know one knows the answer to this one? I'm digging thru my VBScript books as we speak... no luck yet... I'll let you know if I find out the answer!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 09, 2007 8:01 pm

It's not possible. Firefox is a completely different product. It doesn't have a COM interface. Therefore it cannot be scripted with VBScript.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Jul 09, 2007 8:03 pm

From the info in this thread I'd guess its not possible to do this with FireFox.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 09, 2007 8:09 pm

One of the reasons Firefox is more secure than IE is precisely because it is not as easily scripted. And, anyway, why does it need to be? Even if Firefox is your preferred browser (as it is mine) what is wrong with Macro Scheduler using IE for automation? By definition if something is being automated you can leave it to get on with it. Should it therefore matter that YOU use Firefox and Macro Scheduler uses IE? IE is on every PC anyway. On our PCs it only ever gets used for automation while us humans stick to Firefox.

If, for some unfathomable reason, you really really need to automate Firefox, image recognition is one reliable method. Or AppNavigator.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Mon Jul 09, 2007 8:16 pm

You can always

RunProgram>"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.google.com

but you'll need to write a lot of other code to get the same level of control you would have with IE.

clickfast
Pro Scripter
Posts: 58
Joined: Wed May 23, 2007 12:04 am

Post by clickfast » Tue Jul 10, 2007 11:00 pm

Ok now I understand... it's basically not possible to script Firefox.

However, I did find this thread (http://www.mjtnet.com/usergroup/viewtop ... ht=browser) and it works with whatever is your default browser! In this case, firefox opens up for me!!

Code: Select all

RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\Classes\HTTP\Shell\Open\command,,value
Separate>value,.EXE,var
Let>url=http://www.mjtnet.com
Run>"%var_1%.exe" "%URL%"
check out that thread.. .it may be the answer

Thanks to all for attempting to help!!!!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jul 11, 2007 7:15 am

Yes, that's fine if you only want to open firefox. But you won't then be able to script it as you can IE.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Fri Jul 13, 2007 2:47 pm

Or you can also use a simple one liner to open URL's in fire fox!

Code: Select all

exe>FIREFOX,http://www.mjtnet.com

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts