Created
March 6, 2012 20:21
-
-
Save brigand/1988757 to your computer and use it in GitHub Desktop.
Learn Internet Explorer COM by checking your balance on an imaginary bank account.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance Force | |
#Include %A_ScriptDir%\IEFuncs.ahk | |
pwb := IE("http://aboutscript.com/apps/autobank") | |
Wait(pwb) | |
pwb.document.form[0].value := "johny" | |
pwb.document.form[1].value := "johny123" | |
pwb.document.form.submit() | |
Wait(pwb) | |
Contents := pwb.document.getElementById("ballance").innerText | |
pwb.quit() | |
MsgBox % Contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IE(site="", visible=false) { | |
pwb := ComObjCreate("InternetExplorer.Application") | |
pwb.visible := visible | |
pwb.ToolBar := false | |
if site | |
pwb.navigate(site) | |
return pwb | |
} | |
Wait(pwb) { | |
while (pwb.ReadyState != 4) or (pwb.busy) | |
Sleep 100 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment