Joe-Schmo Posted January 31, 2007 Share Posted January 31, 2007 Hey all, Here is a simple script: RegWrite ( "HKCU\Control Panel\Mouse", "SwapMouseButtons", "REG_SZ", "1" ) This is simply switching the left/right mouse buttons around for left handed users in windows 2000. The problem Im having is Im trying to apply these changes without logging out of the workstation and back in. Does anyone know of a way to Apply or re-read user registry settings? Thanks Link to comment Share on other sites More sharing options...
Pakku Posted January 31, 2007 Share Posted January 31, 2007 try this: ProcessClose("explorer.exe") Do Sleep(1000) Until ProcessExists("explorer.exe") = 0 Run("explorer.exe") Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
Joe-Schmo Posted January 31, 2007 Author Share Posted January 31, 2007 Thanks for the suggestion! However this did not work. It does what you want it to but it does not reload the mouse changes I have may until I logout and re-login. Any other suggestions? Link to comment Share on other sites More sharing options...
Shevilie Posted February 1, 2007 Share Posted February 1, 2007 This might work Run this command RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Shevilie Posted February 2, 2007 Share Posted February 2, 2007 RUNDLL32 USER32.DLL,SwapMouseButton Well work the one way Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 2, 2007 Share Posted February 2, 2007 HI, try: #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 _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 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 Link to comment Share on other sites More sharing options...
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