Stumpii Posted January 19, 2006 Share Posted January 19, 2006 (edited) I posted this about automating Mozilla (originator to Firefox) in the support forum earlier in response to a question, but as it is interesting and now a script/scrap, I thought I would put it here as well.The following code shows simply how to use the Mozilla ActiveX control instead of the IE control on an AutoIt form. Checkout the homepage of the Mozilla ActiveX control here.CODE#include <GUIConstants.au3>$oIE = ObjCreate("Mozilla.Browser.1"); Create a simple GUI for our outputGUICreate ( "Embedded Web control Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)$GUIActiveX = GUICtrlCreateObj ( $oIE, 10, 40 , 600 , 360 )$GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30)$GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30)$GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30)$GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30)GUISetState () ;Show GUI$oIE.navigate("http://www.autoitscript.com"); Waiting for user to close the windowWhile 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE $oIE = 0 ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("http://www.autoitscript.com") Case $msg = $GUI_Button_Back $oIE.GoBack Case $msg = $GUI_Button_Forward $oIE.GoForward Case $msg = $GUI_Button_Stop $oIE.Stop EndSelect WendGUIDelete ()ExitTo get this to work, you need to first download the Mozilla ActiveX control from here. Then to be able to create on the fly in AutoIt, you need to unregister 'mozctl.dll' in the installation folder (C:\Program Files\Mozilla ActiveX Control v1.7.12 in my case) and register 'mozctlx.dll' in the same folder. To do this, open command prompt, navigate to the folder and type 'regsvr32 -u mozctl.dll' and then 'regsvr32 mozctlx.dll'.The code should then run. The interface is the same as IE, so program with the IE control first, then swap for Mozilla.Note that the control implements compatibility with IE4. Also I would say that anyone that wants a simple browser pane to show an HTML readme, etc. should take a look. If you want to examine the forms or HTML makeup of a webpage, then you are probably better off using IE. Edited January 25, 2006 by Stumpii Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity. Link to comment Share on other sites More sharing options...
Lazarus Posted March 27, 2007 Share Posted March 27, 2007 Nice work, thank you! (That activeX control could be integrated :S) Link to comment Share on other sites More sharing options...
MCP Posted September 15, 2007 Share Posted September 15, 2007 The following code shows simply how to use the Mozilla ActiveX control instead of the IE control on an AutoIt form. Checkout the homepage of the Mozilla ActiveX control here.Yes! This is great. Gotta try. I am not using Iternet Explorer anymore!!!!! If you want to examine the forms or HTML makeup of a webpage, then you are probably better off using IE.Not so sure. It should ALWAYS be better to check them with BOTH browsers. IE only sites downgrade the companies image. They say the companies are acting simply as if they were stupid microsoft associates, thus missing a wide range of visitors running mac and linux operating systems.It is not a religion war a company or a web developer should run into: it is a microsoft only dirty war. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted September 16, 2007 Share Posted September 16, 2007 Then to be able to create on the fly in AutoIt, you need to unregister 'mozctl.dll' in the installation folder (C:\Program Files\Mozilla ActiveX Control v1.7.12 in my case) and register 'mozctlx.dll' in the same folder. To do this, open command prompt, navigate to the folder and type 'regsvr32 -u mozctl.dll' and then 'regsvr32 mozctlx.dll'.Why do you have to do this? I installed this a while ago and just ran your script and it ran just fine.Is there a way to run this with only a dll or doing a silent install? Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
cypher175 Posted June 1, 2009 Share Posted June 1, 2009 Sorry to revive this thread from the dead, but I just found this and was interested in embedding FF into my AutoIt GUI..I downloaded & installed the http://www.iol.ie/%7Elocka/mozilla/MozillaControl1712.exe and successfully tested the script below..But I'm having a few problems though interfacing the _IE UDF's with the FF Object though..!! Stumpii Said "The interface is the same as IE, so program with the IE control first, then swap for Mozilla."so this it what I did, but the _IELoadWaitTimeout keeps occurring with this message..."--> IE.au3 V2.4-0 Warning from function _IELoadWait, $_IEStatus_LoadWaitTimeout"because the _IENavigate($IE, "http://google.com") function doesn't seem to be returning the webpage load complete status or something because its probably looking to use IE instead or something, so then _IELoadWaitTimeout(15000) kicks in and ends the _IENavigate Function..??So is there anyway to correct this issue or is embedding FF into a GUI still kinda sketchy right now..?? #NoTrayIcon #include <IE.au3> #include <Misc.au3> _Singleton(@ScriptName) $IE = ObjCreate("Mozilla.Browser.1") _IELoadWaitTimeout(15000) GUICreate("AAA", 1100, 800) GUICtrlCreateObj($IE, 0, 0, 1100, 800) GUISetState () ;Show GUI While 1 _IENavigate($IE, "http://google.com", 1) ToolTip("Finished Loading") Sleep(5000) WEnd Link to comment Share on other sites More sharing options...
James Posted June 2, 2009 Share Posted June 2, 2009 _IE functions are for IE only, he means the main properites: .navigate .stop etc Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
cypher175 Posted June 3, 2009 Share Posted June 3, 2009 (edited) What are the other main properties then..?? Is there a list somewhere that explains them all..?? Edited June 3, 2009 by cypher175 Link to comment Share on other sites More sharing options...
James Posted June 3, 2009 Share Posted June 3, 2009 Just use a COM viewer? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
cypher175 Posted June 3, 2009 Share Posted June 3, 2009 never heard of such a thing.. can you recommend one to me..?? Link to comment Share on other sites More sharing options...
cypher175 Posted June 3, 2009 Share Posted June 3, 2009 how would get this to work with the Mozilla ActiveX control..?? $GetFormTags = _IETagNameGetCollection($IE, 'FORM') $NumFormTags = @extended For $i = 0 to $NumFormTags - 1 $FORM = _IETagNameGetCollection($IE, 'FORM', $i) Next Link to comment Share on other sites More sharing options...
James Posted June 3, 2009 Share Posted June 3, 2009 never heard of such a thing.. can you recommend one to me..??It's been mentioned before, I'll look. how would get this to work with the Mozilla ActiveX control..?? $GetFormTags = _IETagNameGetCollection($IE, 'FORM') $NumFormTags = @extended For $i = 0 to $NumFormTags - 1 $FORM = _IETagNameGetCollection($IE, 'FORM', $i) NextYou'll have to refer to the ActiveX control guide. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted June 3, 2009 Share Posted June 3, 2009 Try this. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
WideBoyDixon Posted June 3, 2009 Share Posted June 3, 2009 Try this.Or thisNote that you'll need to select File/View TypeLib... to load the DLL and see the COM interfaces.WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center] Link to comment Share on other sites More sharing options...
James Posted June 3, 2009 Share Posted June 3, 2009 Or thisNote that you'll need to select File/View TypeLib... to load the DLL and see the COM interfaces.WBDHa, thanks WBD! Stupid links. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
cypher175 Posted June 4, 2009 Share Posted June 4, 2009 so has anyone else done all this before and has already got a list of working FF Functions..?? Link to comment Share on other sites More sharing options...
ValeryVal Posted July 22, 2009 Share Posted July 22, 2009 It works for me, though: expandcollapse popup#include <GUIConstants.au3> #include <WindowsConstants.au3> ; Example: Embedding an Mozilla Object inside an AutoIt GUI ; Download Mozilla ActiveX Control ; from http://www.brothersoft.com/mozilla-activex-control-download-78221.html $Mozilla = ObjCreate("Mozilla.Browser") ; Get the Mozilla ActiveX instance if Not IsObj($Mozilla) then Msgbox(0,"Mozilla","Can't find Mozilla ActiveX Control") endif ; Create a simple GUI for our output GUICreate ( "Embedded Mozilla Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj ( $Mozilla, 10, 40 , 600 , 360 ) $GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30) $GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30) $GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30) $GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30) GUISetState () ;Show GUI $Mozilla.navigate("http://www.autoitscript.com/forum/index.php?showtopic=95595") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $Mozilla.navigate("http://www.autoitscript.com/forum/") Case $msg = $GUI_Button_Back $Mozilla.GoBack Case $msg = $GUI_Button_Forward $Mozilla.GoForward Case $msg = $GUI_Button_Stop $Mozilla.Stop EndSelect Wend $Mozilla = 0 GUIDelete() exit You have to download Mozilla ActiveX Control from http://www.brothersoft.com/mozilla-activex-control-download-78221.html and install it, only. The point of world view Link to comment Share on other sites More sharing options...
timothy855 Posted May 25, 2013 Share Posted May 25, 2013 (edited) Here I am to stir the pot. I'm a noob, and I'm trying to use firefox instead of IE. The links above no longer work, so I don't know where to go to get the things necessary. Can someone help me please? I'm getting a small handle on things by reading forums, watching vids, and reading the help files, but it's all still a foreign language to me. I'm not trying to build a program that I can interact with, but something that will login to a particular website, do a few straight forward things, wait for something to happen, do a few more things, and then comes an if/then situation, then some more straight forward stuff, and finally repeat. I don't know which sorts of functions I should use,....or anything. I'm so lost but I really need this to work for me. :( :( If you would like the challenge, please email me and we can do this thing together. timothy855 @gmail.com Edited May 25, 2013 by timothy855 Link to comment Share on other sites More sharing options...
Danp2 Posted May 25, 2013 Share Posted May 25, 2013 See Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
water Posted May 25, 2013 Share Posted May 25, 2013 Welcome to Autoit and the forum! Why did you necro this 4 year old thread? Open a new one and you will get much more attention. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now