Page 1 of 1

Programming a "Sniper" button

Posted: 2013-05-31 00:24
by smgunsftw
I recently got the Gigabyte GM-M6880 mouse off of NCIX, and I'm satisfied with its performance per dollar ($25). It's got a 3 stage DPI adjustment button as well as two forward and back buttons. However, I'm trying to program one of the buttons on the sides to act as a "sniper" button, which is basically a button that decreases your sensitivity whenever it is held down. The software that is included with the mouse doesn't support this feature at the moment.

I've searched other websites for tips on how to do this, and ended up making it work with an AutoHotKey script. The only problem is that the button only works when I'm browsing the internet or using Windows Explorer. Whenever I start a game, whether it be PR, GTA:SA, Company of Heroes, etc. the button does not work any more.

Does anyone know why this is happening? Is this is a intended effect to prevent hacking, or a software/programming error on my part?

This is my mouse AHK configuration:
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <[email protected]>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

#InstallMouseHook
#Persistent
SPI_GetMouseSpeed:= 0x70
SPI_SetMouseSpeed:= 0x71
DesiredMouseSpeed:= 3 ; use 1 to 20, default is 10
XButton2::
DllCall("SystemParametersInfo", UInt, SPI_GetMouseSpeed, UInt, 0, UIntP, OrigMouseSpeed, UInt, 0)
DllCall("SystemParametersInfo", UInt, SPI_SetMouseSpeed, UInt, 0, UInt, DesiredMouseSpeed, UInt, 0)
DllCall("SystemParametersInfo", UInt, 0x71, UInt, 0, UInt, OrigMouseSpeed, UInt, 0)
Return

Re: Programming a "Sniper" button

Posted: 2013-05-31 02:07
by PLODDITHANLEY
I just switch dpi up for turrets down for long range aiming.

Re: Programming a "Sniper" button

Posted: 2013-05-31 03:01
by smgunsftw
But still, would you rather have a sniper button that allows you to change DPI within a few milliseconds, or having to scroll through all the settings on your DPI selector?

Re: Programming a "Sniper" button

Posted: 2013-06-01 21:57
by PLODDITHANLEY
To me with my G9 once up or down is enough.

Re: Programming a "Sniper" button

Posted: 2013-06-05 18:26
by Vicious302
I just can't imagine the need for this. You need to find a sweet spot that works for everything. Like same thing with the mumble volume situation, but non the less I hope you find whatever results your looking for, goodluck.