I think the key concept your missing here Benny is that it doesnt matter about the language the objects are the same
the only difference would be syntax accross languages to create an object. in the case of ahk_L vs javascript very little at all will change once you have created the base object.
if in javascript you would go
Code:
var somevar = document.getElementsByID("someid").innerText;
then in ahk it would be
Code:
somevar := IE.document.getElementsByID("someid").innerText
the current window is assumed from javascript within the page so it isnt created explicitely like you would have to do with ahk
Code:
ControlGet,cHwnd, Hwnd,, Internet Explorer_Server1, ahk_class IEFrame
IE := IE_GetBrowser(cHwnd)
IE_GetBrowser(hWnd)
{
static IID_IHTMLWindow2 := "{332C4427-26CB-11D0-B483-00C04FD90119}", IID_IWebBrowserApp := "{0002DF05-0000-0000-C000-000000000046}"
return, ComObj(9,ComObjQuery(ComObj(9,ComObjQuery(Acc_ObjectFromWindow(hwnd),IID_IHTMLWindow2,IID_IHTMLWindow2),1),IID_IWebBrowserApp,IID_IWebBrowserApp),1)
}
is one way to get the topmost browser