Skip to content

Instantly share code, notes, and snippets.

@manchicken
Created August 22, 2013 14:46
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 manchicken/6308171 to your computer and use it in GitHub Desktop.
Save manchicken/6308171 to your computer and use it in GitHub Desktop.
I'm a lefty, and sometimes you need to be able to switch which button your mouse settings use (for example, when you use RDP in with a Macbook into a Windows 7 machine) to use right-handed norms on OS' which use "right" and "left" rather than "primary" and "secondary." This is JScript, not JavaScript.
obsS=WScript.CreateObject("WScript.Shell")
obsS.Run("control mouse", 5)
WScript.sleep(1000)
obsS.AppActivate("Mouse")
WScript.Sleep(300)
obsS.Sendkeys(" ")
WScript.Sleep(123)
obsS.SendkEys("{Enter}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment