ActiveX and HTML Version? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JaysonR
Posts: 2
Joined: 23 Apr 2018, 14:33

ActiveX and HTML Version?

23 Apr 2018, 14:48

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
lexikos
Posts: 9589
Joined: 30 Sep 2013, 04:07
Contact:

Re: ActiveX and HTML Version?  Topic is solved

24 Apr 2018, 04:51

"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).
JaysonR
Posts: 2
Joined: 23 Apr 2018, 14:33

Re: ActiveX and HTML Version?

24 Apr 2018, 20:14

As always, thank you for the detailed answer Lexicos!
This helps greatly. :)

Cheers,
Jayson
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: ActiveX and HTML Version?

25 Apr 2018, 00:04

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
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Panaku, Rohwedder, roysubs and 320 guests