Skip to content

Instantly share code, notes, and snippets.

@brigand
Created March 6, 2012 20:21
Show Gist options
  • Save brigand/1988757 to your computer and use it in GitHub Desktop.
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.
#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
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