Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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