IE Load not working in Internet explorer 11.
getting following error
---------------------------
extra.ahk
---------------------------
Error: 0x80010108 - The object invoked has disconnected from its clients.
Specifically: busy
Line#
006: {
007: if !pwb
008: Return,False
009: Loop
010: Sleep,100
---> 011: Until,(pwb.busy)
012: Loop
013: Sleep,100
014: Until,(!pwb.busy)
015: Loop
016: Sleep,100
017: Until,(pwb.Document.Readystate = "Complete")
018: Return,True
Continue running the script?
---------------------------
Yes No
---------------------------
IELoad(pwb)
{
If !pwb ;If wb is not a valid pointer then quit
Return False
Loop ;Otherwise sleep for .1 seconds untill the page starts loading
Sleep,100
Until (pwb.busy)
Loop ;Once it starts loading wait until completes
Sleep,100
Until (!pwb.busy)
Loop ;optional check to wait for the page to completely load
Sleep,100
Until (pwb.Document.Readystate = "Complete")
Return True
}
IE Load not working in Internet explorer 11. Topic is solved
Re: IE Load not working in Internet explorer 11.
Help please. still I didn't get solution.
Re: IE Load not working in Internet explorer 11.
while pwb.busy or pwb.ReadyState != 4
Re: IE Load not working in Internet explorer 11.
It's not working. Can you please add it in above scriptVh_ wrote:while pwb.busy or pwb.ReadyState != 4
Re: IE Load not working in Internet explorer 11.
IELoad(pwb) working on other url but not working with following URL
https://brightree.net/frmLogin.aspx?
getting same error while trying to open above url. Can someone please help me to get IELoad(pwb) work with above URL
https://brightree.net/frmLogin.aspx?
getting same error while trying to open above url. Can someone please help me to get IELoad(pwb) work with above URL
Re: IE Load not working in Internet explorer 11. Topic is solved
Try this.
}
Code: Select all
pwb := WBGet()
pwb.Navigate("https://brightree.net/frmLogin.aspx?") ;Navigate to URL
while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load
Sleep, 100
msgbox, the page has now loaded.
;************Pointer to Open IE Window******************
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)
}
}
Re: IE Load not working in Internet explorer 11.
Seems, it doesn't work anymore if IeFrame window not exists.
Try this workaround:
Edit: Looks like I found better fully automated workaround:
Try this workaround:
Code: Select all
run, iexplore
WinWait, ahk_class IEFrame
WinWaitActive, ahk_class IEFrame
sleep, 1000 ; increase sleep duration if needed
WinGetTitle, WinTitle, ahk_class IEFrame
wb:=pwb_Get(WinTitle, 1)
if winTitle
wb.Navigate("https://brightree.net/frmLogin.aspx?")
while WinActive(WinTitle)
sleep, 100
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy
sleep, 100
MsgBox, Hope workaround works for you!
ExitApp
PWB_Get(WinTitle="A", Svr#=1) ; Jethrow - http://www.autohotkey.com/board/topic/47052-basic-webpage-controls-with-javascript-com-tutorial/
{
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)
}
}
MsgBox, 262160, %A_ScriptName% - %A_ThisFunc%(): Error, Unable to obtain browser object (PWB) from window:`n`n%WinTitle%
}
Code: Select all
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := true
wb.Navigate("", 0)
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy
sleep, 100
wb.Navigate("https://brightree.net/frmLogin.aspx?")
wb:=pwb_Get()
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy
sleep, 100
MsgBox, Webpage loaded
ExitApp
PWB_Get(WinTitle="A", Svr#=1) ; Jethrow - http://www.autohotkey.com/board/topic/47052-basic-webpage-controls-with-javascript-com-tutorial/
{
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)
}
}
MsgBox, 262160, %A_ScriptName% - %A_ThisFunc%(): Error, Unable to obtain browser object (PWB) from window:`n`n%WinTitle%
}