Skrip Posted December 29, 2006 Posted December 29, 2006 Is it possible to switch mouse primary buttons? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Moderators SmOke_N Posted December 29, 2006 Moderators Posted December 29, 2006 Is it possible to switch mouse primary buttons?I made this a while ago personally to find the Primary.Func _MouseGetPrimary() Local $aDLLMButton = DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', True) If IsArray($aDLLMButton) And $aDLLMButton[0] <> 0 Then Return 'Right' If IsArray($aDLLMButton) And $aDLLMButton[0] = 0 Then DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', False) Return 'Left' EndFunc ;==>_MouseGetPrimaryoÝ÷ Ù*²êi¢Ç¢Ø^¢¼+0¢é]Âäjëh×6_SwitchMousePrimary(_MouseGetPrimary()) Func _MouseGetPrimary() Local $aDLLMButton = DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', True) If IsArray($aDLLMButton) And $aDLLMButton[0] <> 0 Then Return 0 If IsArray($aDLLMButton) And $aDLLMButton[0] = 0 Then DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', False) Return 1 EndFunc ;==>_MouseGetPrimary Func _SwitchMousePrimary($nPrimary) Return DllCall('User32.dll', 'int', 'SwapMouseButton', 'int', $nPrimary) EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
James Posted December 29, 2006 Posted December 29, 2006 Smoke_N... That works, and I can't turn it off Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Xenobiologist Posted December 29, 2006 Posted December 29, 2006 Hi, #cs mode = 1 for swapping mode = 0 for returning to normal mode #ce SwapMouseButton() ToolTip("swapped!", 0, 0) Sleep(5000) SwapMouseButton(0) ToolTip("Normal!", 0, 0) Func SwapMouseButton($mode = 1) DllCall("user32.dll", "int", "SwapMouseButton", "int", $mode) EndFunc ;==>SwapMouseButton Question is, whether you want to swap even if your script insn't active. This swapps for every app! So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now