Try
SwapMouseButtons!
Just press Windows-S to swap the left and right mouse buttons.
Skrommel
;SwapMouseButtons.ahk
; Press Windows-S to swap mouse buttons
;Skrommel @ 2008
#SingleInstance,Force
SendMode,Input
SetWindelay,0
SetKeyDelay,0
#s::
RegRead,swapped,HKEY_CURRENT_USER,Control Panel\Mouse,SwapMouseButtons
If swapped<>1
{
Run,RUNDLL32 USER32.DLL`,SwapMouseButton
RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Mouse,SwapMouseButtons,1
}
Else
{
Run,RUNDLL32.EXE SHELL32.dll`,Control_RunDLL main.cpl @0`,0
WinWait,ahk_class #32770
WinActivate,ahk_class #32770
WinWaitActive,ahk_class #32770
Send,%A_Space%{Enter}
RegWrite,REG_SZ,HKEY_CURRENT_USER,Control Panel\Mouse,SwapMouseButtons,0
}
Return