InnerText is not showing anything while automating Internet Explorer using WBGet function

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Sabestian Caine
Posts: 528
Joined: 12 Apr 2015, 03:53

InnerText is not showing anything while automating Internet Explorer using WBGet function

18 Oct 2023, 08:12

I want to see this text in msgbox (as showin in red circle)-
18_10_23 @6_36_20.PNG
18_10_23 @6_36_20.PNG (44.49 KiB) Viewed 205 times
and for this i am trying to use these codes-

Code: Select all

WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)

MsgBox % oWB.Document.all(88).innertext


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 {
			DllCall("oleacc\ObjectFromlresult", "ptr",lResult, "ptr",&GUID, "ptr",0, "ptr*",pdoc)
			return ComObj(9,ComObjQuery(pdoc,IID,IID),1), ObjRelease(pdoc)
		}
	}
}

but it is showing a blank msgbox...
please tell me what is wrong in my script?
Thanks a lot..
I don't normally code as I don't code normally.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RickC and 68 guests