I'm new to using COM and i'm not sure what i'm reading on MSDN.
i'm trying to create a script that fills out forms through IE11.
but on my very first step, i need to wait for the page to finish loading, and the normal COM methods are ineffective.
Code: Select all
pwb := ComObjCreate("InternetExplorer.Application")
pwb.Visible:=true
pwb.Navigate("website")
while pwb.Busy or pwb.readyState != 4
Sleep, 100
MsgBox, done loading
I'm unsure how or where to look to fix the error.
both Busy and readyState seem to not be functional on this particular page.
any ideas?
Here is the error i'm getting
---------------------------
Replacements.ahk
---------------------------
Error: 0x80004005 - Unspecified error
Source: (null)
Description: (null)
HelpFile: (null)
HelpContext: 0
Specifically: busy
Line#
001: pwb := ComObjCreate("InternetExplorer.Application")
002: pwb.visible:=true
003: pwb.Navigate("website")
---> 004: While,pwb.busy || pwb.ReadyState != 4
005: Sleep,100
006: Exit
007: Exit
007: Exit
Continue running the script?
---------------------------
Yes No
---------------------------