Using facebook as an example, the COM ID "pass" exist, but if I navigate away, I should get an error message because ID no longer exists.
Code: Select all
^a::
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := true
wb.Navigate("www.facebook.com")
return
^q::
If wb.document.GetElementById("pass") {
MsgBox, ID Exist
return
}
else
{
MsgBox, ID does not exist
return
}
Code: Select all
^z::
wb.document.GetElementById("pass") := false
while(wb.document.GetElementById("pass") := False) {
if wb.document.GetElementById("pass")
{
wb.document.GetElementById("pass") := true
break
}
Sleep, 500
}
MsgBox, it worked
return