This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WM_KEYDOWN = 0x100 | |
GoSub, GetHTML | |
OnMessage(WM_KEYDOWN, "WM_KeyDown") | |
Gui Add, ActiveX, w350 h300 x0 y0 vdoc, HTMLFile | |
doc.write(html) | |
Gui, Show, w310 h265 Center, HTML Based GUI | |
doc.all.type.focus | |
ComObjConnect(doc, "Doc_") | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoHotkey_L: | |
IEGet(name="") { | |
IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame ; Get active window if no parameter | |
Name := (Name="New Tab - Windows Internet Explorer")? "about:Tabs":RegExReplace(Name, " - (Windows|Microsoft) Internet Explorer") | |
for WB in ComObjCreate("Shell.Application").Windows | |
if WB.LocationName=Name and InStr(WB.FullName, "iexplore.exe") | |
return WB | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoHotkey_L: | |
WBGet(WinTitle="ahk_class IEFrame", Svr#=1) { ; based on ComObjQuery docs | |
static msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT") | |
, IID := "{0002DF05-0000-0000-C000-000000000046}" ; IID_IWebBrowserApp | |
; , IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ; IID_IHTMLWindow2 | |
SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle% | |
if (ErrorLevel != "FAIL") { | |
lResult:=ErrorLevel, VarSetCapacity(GUID,16,0) | |
if DllCall("ole32\CLSIDFromString", "wstr","{332C4425-26CB-11D0-B483-00C04FD90119}", "ptr",&GUID) >= 0 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WBGet(WinTitle="ahk_class IEFrame", Svr#=1) | |
{ | |
static msg, IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ; IID_IWebBrowserApp | |
if Not msg | |
msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT") | |
SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle% | |
if (ErrorLevel != "FAIL") { | |
lResult:=ErrorLevel, GUID:=COM_GUID4String(IID_IHTMLDocument2,"{332C4425-26CB-11D0-B483-00C04FD90119}") | |
DllCall("oleacc\ObjectFromLresult", "Uint",lResult, "Uint",GUID, "int",0, "UintP",pdoc) | |
return COM_QueryService(pdoc,IID,IID), COM_Release(pdoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wb := WBGet() | |
MsgBox % wb.document.documentElement.innerHTML | |
WBGet(WinTitle="ahk_class IEFrame", Svr#=1) { ; based on ComObjQuery docs | |
static msg := DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT") | |
, IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ; IID_IWebBrowserApp | |
SendMessage msg, 0, 0, Internet Explorer_Server%Svr#%, %WinTitle% | |
if (ErrorLevel != "FAIL") { | |
lResult:=ErrorLevel, VarSetCapacity(GUID,16,0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetTitleMatchMode 2 | |
MsgBox % Acc_Get("Value", "4.20.2.4.2", 0, "Firefox") | |
MsgBox % Acc_Get("Value", "application1.property_page1.tool_bar2.combo_box1.editable_text1", 0, "Firefox") | |
Acc_Get(Cmd, ChildPath="", ChildID=0, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="") { | |
static properties := {Action:"DefaultAction", DoAction:"DoDefaultAction", Keyboard:"KeyboardShortcut"} |