Skip to content

Instantly share code, notes, and snippets.

@pwlin
Created May 12, 2015 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwlin/f0cd4255c658760a0890 to your computer and use it in GitHub Desktop.
Save pwlin/f0cd4255c658760a0890 to your computer and use it in GitHub Desktop.
WScript.Shell automation
set WshShell = WScript.CreateObject("WScript.Shell")
sub shell(cmd)
dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run(cmd)
Set objShell = Nothing
end sub
shell """C:\Program Files\Internet Explorer\iexplore.exe"" https://accounts.google.com/ServiceLogin?service=mail&passive=true&continue=https://mail.google.com/mail/h/html"
WScript.Sleep 2000
WshShell.SendKeys "username"
WScript.Sleep 1000
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000
WshShell.SendKeys "password"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
WScript.Quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment