ahk_l 과 com 의 이해
COM Object Reference [AutoHotkey_L]
Goto page 1, 2, 3, 4, 5, 6, 7, 8 Next
COM Standard Library
Goto page 1, 2, 3 ... 41, 42, 43 Next
url:="http://www.google.com"
pwb.Navigate(url)
loop
If !pwb.busy
break
;; get the gui handle
GuiHWND:= WinExist()
;; create an instance of Internet Explorer_Server return the hwnd
ATLWinHWND := Atl_AxCreateContainer(GuiHWND,0,0,510,600, "Shell.Explorer")
;;get the iwebbrowser2 interface pointer
pwb := Atl_AxGetControl( ATLWinHWND )
; insert an HTMLfile into the control
doc := COM_AtlAxCreateControl( ctrl_hwnd, "HTMLfile" ) ; http://msdn.microsoft.com/en-us/library/da181h29
NativeCom(doc) ; ensures the "doc" object uses Native COM
doc.write(html)
NativeCom( ByRef obj ) { ; ensures the "obj" object uses Native COM
if Not IsObject(obj)
return
ComObjError(false)
if Not ComObjType(obj,"iid")
obj := ComObjEnwrap(COM_Unwrap(obj))
ComObjError(true)
}