Windows Script Hosting

With Windows script hosting you can do a lot of things.. you can automatically execute a program and perform some actions on it using Send keys method..


Here is more about Send Keys method and Windows Script Hosting

Here is a sample Script of it

 set WshShell = WScript.CreateObject("WScript.Shell")
         WshShell.Run "calc"
         WScript.Sleep 100
         WshShell.AppActivate "Calculator"
         WScript.Sleep 100
         WshShell.SendKeys "1{+}"
         WScript.Sleep 500
         WshShell.SendKeys "2"
         WScript.Sleep 500
         WshShell.SendKeys "~"
         WScript.Sleep 500
         WshShell.SendKeys "*3"
         WScript.Sleep 500
         WshShell.SendKeys "~"
         WScript.Sleep 2500

This entry was posted on Monday, September 22nd, 2008 at 2:45 pm and is filed under Programming Languages. You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

Comments are closed.