Page 1 of 1

unable to put text in google search bar and click search button in Internet Explorer using WbGet function?

Posted: 12 Jan 2023, 11:50
by Sabestian Caine

Code: Select all

WinGet, hWnd, ID, A
oWB := WBGet("ahk_id " hWnd)
oWB.document.all(55).value:= "AutoHotKey"
oWB.document.all(60).click()


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)
		}
	}
}

in the above codes index 55 because it is showing in iWB2 learner tool. please look this image-
12_01_23 @10_15_55.PNG
12_01_23 @10_15_55.PNG (33.72 KiB) Viewed 319 times
in second line of code i used index 60 because in iWB2 learner tool, it is showing 60...please look this image-
12_01_23 @10_20_36.PNG
12_01_23 @10_20_36.PNG (44.08 KiB) Viewed 319 times
please help me.... the above codes are not working....
thanks..