Skip to content

Instantly share code, notes, and snippets.

@jutememo
Created September 9, 2012 14:44
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 jutememo/3684787 to your computer and use it in GitHub Desktop.
Save jutememo/3684787 to your computer and use it in GitHub Desktop.
var setControlPanel = function(cmd, title, keystrokes){
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run(cmd);
do {
WScript.Sleep(100);
} while(!WshShell.AppActivate(title));
WshShell.SendKeys(keystrokes);
};
setControlPanel(WScript.Arguments.item(0),
WScript.Arguments.item(1),
WScript.Arguments.item(2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment