@tank I tried to integrate your code as such:
Code: Select all
Gui Add, ActiveX, vdoc xm w1000 h300, about:<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge"> ; the "IE=edge" should force Shell.Explorer to use the latest IE renderer. I have internet explorer 11 and Microsoft Edge installed.
doc.silent := true ; Surpress JS Error boxes, commented out for debugging
doc.Navigate("https://stin.to/ozfc6")
;// necesary to accept enter and accelorator keys
;http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.ole.interop.ioleinplaceactiveobject(VS.80).aspx
IOleInPlaceActiveObject_Interface:="{00000117-0000-0000-C000-000000000046}"
;// necesary to accept enter and accelorator keys
;// get the in place interface pointer
pipa := ComObjQuery(doc, IOleInPlaceActiveObject_Interface)
;// necesary to accept enter and accelorator keys
;// capture key messages
OnMessage(WM_KEYDOWN:=0x0100, "WM_KEYDOWN")
OnMessage(WM_KEYUP:=0x0101, "WM_KEYDOWN")
Gui, Show
Return
WM_KEYDOWN(wParam, lParam, nMsg, hWnd) ;// modeled after code written by lexikos
{
global wb, pipa
static fields := "hWnd,nMsg,wParam,lParam,A_EventInfo,A_GuiX,A_GuiY"
WinGetClass, ClassName, ahk_id %hWnd%
if (ClassName = "Internet Explorer_Server")
{
;// Build MSG Structure
VarSetCapacity(Msg, 48)
Loop Parse, fields, `,
NumPut(%A_LoopField%, Msg, (A_Index-1)*A_PtrSize)
;// Call Translate Accelerator Method
TranslateAccelerator := NumGet(NumGet(1*pipa)+5*A_PtrSize)
Loop 2 ;// only necessary for Shell.Explorer Object
r := DllCall(TranslateAccelerator, "Ptr",pipa, "Ptr",&Msg)
until wParam != 9 || wb.document.activeElement != ""
if r = 0 ;// S_OK: the message was translated to an accelerator.
return 0
}
}
It didn't work though, I must have done something wrong.