Created
April 30, 2012 02:14
-
-
Save jethrow/2554930 to your computer and use it in GitHub Desktop.
This file contains hidden or 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) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment