Advertisement
aveyo

swapmousebuttons

Mar 30th, 2018
2,331
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.48 KB | None | 1 0
  1. @echo off & title Swap mouse buttons
  2. set "s1=$m='[DllImport("user32.dll")]public static extern Int32 SwapMouseButton(Int32 bSwap);"
  3. set "s2=public static void SwapMB(){ int isright=SwapMouseButton(1); if (isright != 0) { SwapMouseButton(0); } }';"
  4. set "s3=add-type -name Import -member $m -namespace Dll; [Dll.Import]::SwapMB();"
  5. set "ps_swapmousebutton=%s1%%s2%%s3%"
  6. call powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -Command "%ps_swapmousebutton:"=\"%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement