Skip to content

Instantly share code, notes, and snippets.

@jutememo
Created August 19, 2012 11:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jutememo/3394355 to your computer and use it in GitHub Desktop.
Save jutememo/3394355 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("control main.cpl",
"マウスのプロパティ",
"{" + WScript.Arguments.item(0) +
"}^{TAB}{HOME}{DOWN " +
WScript.Arguments.item(1) +
"}{ENTER}"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment