Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › I want my mouse speed to change automaticly
New Posts  All Forums:Forum Nav:

I want my mouse speed to change automaticly

post #1 of 4
Thread Starter 
When I have my mouse plugged in, I want the mouse speed to be slow,
and when the mouse is plugged out, and I'm usinig the touch-pad, I want it to be fast.
Is there a way to automate that?

Mabe with a macro?
I know nothing about that.
    
CPUMotherboardGraphicsRAM
AMD Athlon II X3 435 Asus M4A77TD Pro Radeon 4890, 1GB 2x2GB DDR3 1333 
OS
Win 7 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD Athlon II X3 435 Asus M4A77TD Pro Radeon 4890, 1GB 2x2GB DDR3 1333 
OS
Win 7 
  hide details  
Reply
post #2 of 4
If you had a Microsoft HABU, Etc, you could adjust it directly from a button on top of the mouse. But in your case, there's some keybind needed, which I don't know . Sorry.
Sirius.
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Quad Q6600 @ 3.65 GHz 405x9. AsusTek P5Q-E. PowerColor ATi Radeon HD5850. Ballistix Tracer RED Series 4GB @ 950MHz. 
Hard DriveOptical DriveOSKeyboard
750GB 7200RPM SpinPoint F1. Samsung SuperWriteMaster. Microsft Windows Vista Home Premium X86. Microsoft Reclusa. 
PowerCaseMouseMouse Pad
PipeRock 900W. Antec 1200. Microsoft Habu. Table. 
  hide details  
Reply
Sirius.
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core 2 Quad Q6600 @ 3.65 GHz 405x9. AsusTek P5Q-E. PowerColor ATi Radeon HD5850. Ballistix Tracer RED Series 4GB @ 950MHz. 
Hard DriveOptical DriveOSKeyboard
750GB 7200RPM SpinPoint F1. Samsung SuperWriteMaster. Microsft Windows Vista Home Premium X86. Microsoft Reclusa. 
PowerCaseMouseMouse Pad
PipeRock 900W. Antec 1200. Microsoft Habu. Table. 
  hide details  
Reply
post #3 of 4
if the mouse has a dpi setting app then yes. if not you would have to change it every time under the mouse options in controll panel.

the other option is to make to batch files. one for fast and one for slow speed.
post #4 of 4
I did some reading and could not find an application to do it. However, I did find this site in which the members successfully made code do change the sensitivity on the fly. They have the code posted, but it isn't compiled, so you will have to do that yourself somehow. ivanw's post is the one with the working code. I've reproduced it here:

Code:
; Autohotkey script "Toggle Mouse sensitivity"
;=================================================================================
SlowMouseSpeed      := 1
NormalMouseSpeed    := true ; State of Mouse pointer speed
UserMouseSpeed      := 0    ; Speed sensed before slow down
MouseThreshold1     := 6
MouseThreshold2     := 10
MouseEnhance        := 1

SPI_GETMOUSESPEED   := 0x70
SPI_SETMOUSESPEED   := 0x71
SPI_SETMOUSE        := 0x04

;=================================================================================
*F17::   toggleMouseSpeed()

;=================================================================================
toggleMouseSpeed() {
    global
    ; SET LOW SPEED
    if( NormalMouseSpeed )
    {
        ; SENSE BEFORE
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,prevSpeed, UInt,0)

        ; Temporarily reduces the mouse cursor's speed.
        ; Retrieve the current speed so that it can be restored later
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,UserMouseSpeed, UInt,0)
        ; Slow down mouse speed
        DllCall("SystemParametersInfo", UInt,SPI_SETMOUSESPEED, UInt,0, UInt,SlowMouseSpeed, UInt,0)

        ; SENSE AFTER
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,currentSpeed, UInt,0)
        ToolTip, Mouse slow: %currentSpeed%/20

        ; REMEMBER CURRENT STATE
        NormalMouseSpeed := false
    }
    ; RESTORE SPEED
    else {
        ; SENSE BEFORE
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,prevSpeed, UInt,0)

        ; Restore the original speed.
        DllCall("SystemParametersInfo", UInt, SPI_SETMOUSESPEED, UInt,0, UInt,UserMouseSpeed, UInt,0)

        ; Restore the original speed acceleration thresholds and speed
        VarSetCapacity(MySet, 32, 0)
        InsertInteger(MouseThreshold1, MySet, 0)
        InsertInteger(MouseThreshold2, MySet, 4)
        InsertInteger(MouseEnhance   , MySet, 8)
        DllCall("SystemParametersInfo", UInt,SPI_SETMOUSE, UInt,0, Str,MySet, UInt,1)

        ; SENSE AFTER
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,currentSpeed, UInt,0)
        ToolTip, Mouse restored: %currentSpeed%/20

        ; REMEMBER CURRENT STATE
        NormalMouseSpeed := true
    }
    SetTimer, RemoveToolTip, 1000
}
;=================================================================================
InsertInteger(pInteger, ByRef pDest, pOffset = 0, pSize = 4) {
    ; Copy each byte in the integer into the structure as raw binary data.
    Loop %pSize%
    DllCall("RtlFillMemory", "UInt",&pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
}
;=================================================================================
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

;=================================================================================
Here's the original link. I hope you can do something with this, since it's not obvious to me where to go from here. http://www.autohotkey.com/forum/topic14795.html

I know that you want something that will detect whether you have the mouse plugged in and switch automatically, but there wasn't anything that specific online. If you can figure out how to get this code going, maybe you can modify it to look for your mouse at one of your USB addresses and switch if it is found.
X201 Tablet
(13 items)
 
  
CPUGraphicsRAMHard Drive
i7 640LM Intel Integrated 2x 2GB DDR3 1066 250GB internal, 1TB external 
OSKeyboardMouseMouse Pad
Windows 7 Professional x64 Saitek Eclipse Logitech MX518 S&S Steel 
  hide details  
Reply
X201 Tablet
(13 items)
 
  
CPUGraphicsRAMHard Drive
i7 640LM Intel Integrated 2x 2GB DDR3 1066 250GB internal, 1TB external 
OSKeyboardMouseMouse Pad
Windows 7 Professional x64 Saitek Eclipse Logitech MX518 S&S Steel 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › I want my mouse speed to change automaticly