Advertisement
npocmaka

SwapMouseButtons.bat

Nov 4th, 2013
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.62 KB | None | 0 0
  1. :sub echo(str) :end sub
  2. echo off
  3. '>nul 2>&1|| copy /Y %windir%\System32\doskey.exe %windir%\System32\'.exe >nul
  4. '& cscript /nologo /E:vbscript %~f0
  5. '& exit /b
  6.  
  7. Function SwapMouseButtons
  8.   oShell.Run "RUNDLL32.EXE SHELL32.dll,Control_RunDLL main.cpl @0,0"
  9.   WScript.Sleep 200
  10.   oShell.SendKeys "%S"
  11.   oShell.SendKeys "{Enter}"
  12. End Function
  13.  
  14. Function SetMouseLeftHanded
  15.   x = oShell.RegRead("HKCU\Control Panel\Mouse\SwapMouseButtons")
  16.   if x=1 then SwapMouseButtons
  17. End Function
  18.  
  19. Function SetMouseRightHanded
  20.   x = oShell.RegRead("HKCU\Control Panel\Mouse\SwapMouseButtons")
  21.   if x=0 then SwapMouseButtons
  22. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement