Extend IE COM Object

Get help with using AutoHotkey and its commands and hotkeys
c4p
Posts: 17
Joined: 18 Jan 2017, 18:38

Extend IE COM Object

06 May 2017, 21:03

Is it possible to add a new method to IE COM object. I found the workaround to allow this behaviour for simple array. I tried to implement it similarly without success.

Code: Select all

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True
wb.Navigate("http://www.google.com")

; Define the base class.
class _Array {
    newmethod() {
        msgbox Yes I'm the new method!
    }
}

; Redefine Array().
Array(prm*) {
    prm.base := _Array
    return prm
}

wb.newmethod()

Return to “Ask For Help”

Who is online

Users browsing this forum: x-tremespeed and 41 guests