Page 1 of 1

ActiveX and HTML Version?

Posted: 23 Apr 2018, 14:48
by JaysonR
I've searched around and I cannot find topics that discuss this (granted, they may exist and I may be missing them), and the help documentation doesn't really go into detail about the ActiveX function too much in regards to its definition.

My question:
Does the ActiveX control work passively, or does it have an HTML version compatibility built in via the given version of AHK a person is using?
To be clear, what I'm asking here is if when you employ ActiveX into a Gui, is that ActiveX's HTML version compatibility and behavior dictated by that computer's IE browser's HTML version (e.g. let's say the given computer is running IE 6), or is AHK's ActiveX control independent and running its own HTML version compatibility?

The way the help document language is written, I'm assuming that the ActiveX control's HTML version compatibility is defined by the given computer's IE browser's HTML version compatibility, but I'm not certain.

Reference: https://autohotkey.com/docs/commands/Gu ... tm#ActiveX

Cheers,
Jayson

Re: ActiveX and HTML Version?  Topic is solved

Posted: 24 Apr 2018, 04:51
by lexikos
"Gui Add, ActiveX" is not something designed for adding HTML to a GUI.
ActiveX components such as the MSIE browser control can be embedded into a GUI window
ActiveX is basically a set of patterns that controls from different developers may follow to allow programs to utilize those controls by calling standard functions. ActiveX has nothing to do with HTML.

You are using the MSIE browser control (a.k.a. the WebBrowser control), which is just one control built following ActiveX patterns. It exists entirely separate from AutoHotkey. AutoHotkey has no knowledge whatsoever of the WebBrowser control; it merely uses an ActiveX function to request the creation of a control from a given string (such as Shell.Explorer or https://autohotkey.com/boards/ as used in the examples). The ActiveX functions look to the registry to find how to create the control.

So the short answer is that the version of ActiveX control you get has nothing to do with the version number of AutoHotkey.

On systems with IE8 or later, the WebBrowser control operates in IE7 compatibility mode by default. Generally the document must contain something like <meta http-equiv="X-UA-Compatible" content="IE=edge"> to override this, unless you use a registry override based on whichever process name you are using (e.g. AutoHotkey.exe).

Re: ActiveX and HTML Version?

Posted: 24 Apr 2018, 20:14
by JaysonR
As always, thank you for the detailed answer Lexicos!
This helps greatly. :)

Cheers,
Jayson

Re: ActiveX and HTML Version?

Posted: 25 Apr 2018, 00:04
by FanaticGuru
lexikos wrote:On systems with IE8 or later, the WebBrowser control operates in IE7 compatibility mode by default. Generally the document must contain something like <meta http-equiv="X-UA-Compatible" content="IE=edge"> to override this, unless you use a registry override based on whichever process name you are using (e.g. AutoHotkey.exe).
I spent alot of time fooling around with this subject before discoverying this knowledge.

Below is a link to a thread that shows how to modify the registry.
https://autohotkey.com/boards/viewtopic ... 70#p136470

I never did figure out how if you have a document object how to use DOM to basically add <meta http-equiv="X-UA-Compatible" content="IE=edge"> or some equivelant to an existing HTMLfile type object.

FG