Re: switching mouse buttons in vbscript...



> I often have to switch mouse buttons (I'm bi-handed and use two mice
> but when the others have to use my pc with the left mouse they complain.)
> I thought of a little .vbs script that upon doubleclick reverses the buttons.
> Is there an easy way to do that?

I can't give you a complete answer. There is a way to change the setting with
script, but there are two catches. First, you have to know (or get) the current
user ID. I can hard-wire my ID, but I don't know how to read it from the
registry for more than one user. Second, I have to reboot to have it take
effect. Maybe somebody else knows how to make it instantly active. Anyway, the
basics are (watch wrap):

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_USERS\(User ID)\Control Panel\Mouse\SwapMouseButtons",
1, "REG_SZ"

to set it for left handedness.
--
Crash


.



Relevant Pages

  • Re: switching mouse buttons in vbscript...
    ... Volker Hetzer schrieb: ... > I often have to switch mouse buttons (I'm bi-handed and use two mice ... > I thought of a little .vbs script that upon doubleclick reverses the buttons. ...
    (microsoft.public.win32.programmer.wmi)
  • switching mouse buttons in vbscript...
    ... I often have to switch mouse buttons (I'm bi-handed and use two mice ... I thought of a little .vbs script that upon doubleclick reverses the buttons. ... msgBox ...
    (microsoft.public.win32.programmer.wmi)
  • switching mouse buttons in vbscript...
    ... I often have to switch mouse buttons (I'm bi-handed and use two mice ... I thought of a little .vbs script that upon doubleclick reverses the buttons. ...
    (microsoft.public.scripting.wsh)
  • Re: VBS from ASP page
    ... I'm trying to execute a vbs script from an asp page as follows: ... Set WSHShell = CreateObject ... But if I execute the vbs file alone, ...
    (microsoft.public.windows.server.scripting)
  • Re: Expected Statement error
    ... I am trying to run the following vbs script, ... Set WshShell = WScript.CreateObject ... to run a sequence of commands, and that you have verified that if you ... Maybe you want to build a batch file and execute it. ...
    (microsoft.public.scripting.vbscript)