Sign in
Google apps
Main menu
Post a Comment On:
j4neiros
"Using Windows Script for sending keys to an application"
No comments yet. -
1 – 0 of 0
Open the calculator and show the About message for 3 seconds:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("calc")
WScript.Sleep(100)
WshShell.AppActivate("Calculator")
WScript.Sleep(100)
WshShell.SendKeys("%H")
WScript.Sleep(500)
WshShell.SendKeys("{DOWN}")
WScript.Sleep(100)
WshShell.SendKeys("~")
WScript.Sleep(3000)
WshShell.SendKeys("{ESC}")
Close the Calculator:
Set WshShell = WScript.CreateObject("WScript.Shell")
Result = WshShell.AppActivate("Calculator")
WScript.Sleep(100)
If Result = True Then
WshShell.SendKeys "%{F4}"
End If
References:
http://technet.microsoft.com/en-us/library/ee156592.aspx
http://msdn.microsoft.com/en-us/library/8c6yea83(v=vs.85).aspx
posted by J. Ernesto Aneiros at
1:13 PM
on Jul 26, 2011
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
Choose an identity
Google Account
You will be asked to sign in after submitting your comment.
Name/URL
Comment with your Google account if you’d like to be able to manage your comments in the future. If you comment anonymously, you won’t be able to edit or delete your comment.
Learn more
Name
URL
Anonymous
Comment with your Google account if you’d like to be able to manage your comments in the future. If you comment anonymously, you won’t be able to edit or delete your comment.
Learn more
Please prove you're not a robot
"Using Windows Script for sending keys to an application"
No comments yet. -