Created
May 12, 2015 20:50
-
-
Save pwlin/f0cd4255c658760a0890 to your computer and use it in GitHub Desktop.
WScript.Shell automation
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
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