how to use firefox xul component in a GUI ?

Get help with using AutoHotkey and its commands and hotkeys
Posts: 9
Joined: 04 Mar 2015, 04:41

how to use firefox xul component in a GUI ?

01 Dec 2016, 02:05

I'm familiar with how to use an internet explorer activex control inside of a GUI, but I need to use something else because:
1. The intended users for my program don't use IE and probably never update it. Most likely they still have Internet Explorer 8 installed.
2. IE has a bad reputation for following web standards.
3. I found IE to be overly strict compared to firefox with what it will allow you to access and manipulate.

So, I've been searching around trying to find a simple example for how to use a firefox browser component(?) in a GUI. So far, all I've found is extremely old code, broken links, and incomplete code snippets.

From what I understand, I have to download and register one of these:
Mozilla ActiveX Control (looks very old)
Mozilla XULRunner (also outdated but newer?)

Then, somehow I have to call it through COM or load it with DllCall? This is where my understanding falls to pieces :?

One code snippet I found is this:

Code: Select all

GUID4String(CLSID_MozillaBrowser, "{1339B54C-3453-11D2-93B9-000000000000}")

   ;GUID4String(CLSID_WebBrowser, "{8856F961-340A-11D0-A96B-00C04FD705A2}")
   GUID4String(IID_IWebBrowser2, "{D30C1661-CDAF-11D0-8A3E-00C04FC9E26E}")

   hModule := DllCall("LoadLibrary", "str", "atl.dll")
   DllCall(DllCall("GetProcAddress", "Uint", hModule, "str", "AtlAxWinInit"))
   DllCall("FreeLibary", "Uint", hModule)

   hCtrl := DllCall("CreateWindowEx"
      , "Uint", 0x200            ; WS_EX_CLIENTEDGE
      , "str",  "AtlAxWin"         ; ClassName
      , "str",  CLSID_MozillaBrowser      ; WindowName
      , "Uint", 0x10000000 | 0x40000000   ; WS_VISIBLE | WS_CHILD
      , "int",  x            ; Left
Way back in 2009 on vanilla AHK, Wicked was having trouble with it and daonlyfreez helped him out.
But COM_AtlAxGetControl is part of that COM helper library back before COM was integrated in AHK_L, I think? So it's not very helpful.

I'm guessing that the solution is probably a lot simpler looking now. Does anyone know how to do this with the current build of AHK?

Return to “Ask For Help”

Who is online

Users browsing this forum: alexdelara, Getfree, Google [Bot], gwarble, roysubs, swagfag and 211 guests