AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[script] to fix Intellipoint wheel on Win7

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
niver



Joined: 03 Dec 2008
Posts: 4

PostPosted: Tue Mar 16, 2010 5:56 pm    Post subject: [script] to fix Intellipoint wheel on Win7 Reply with quote

Very (VERY) simple script to fix MS Mouse / Intellipoint wheel issues in Windows 7. As the Intellipoint driver sends mousewheel event with small deltas (smaller than the default value of 120), several programs just doesn't know how to handle them and fails to register the event.

This script catches the Intellipoint-generated events and sends a new, identical one but with a standard (120) delta and fixes the issue.

Intellipoint can send 70-120 small mousewheel events per second, thus the MaxHotkeysPerInterval directive.

Code:
; Simple, catch-all script:

#MaxHotkeysPerInterval 200
WheelDown::WheelDown
WheelUp::WheelUp


Another, more complete version, affecting only the windows of programs currently unable to handle the mouse delta. Affected programs known to me: Picasa, Quicken 2008

Code:
#MaxHotkeysPerInterval 200

GroupAdd, MousewheelHandler, ahk_class QFRAME
GroupAdd, MousewheelHandler, ahk_class ytWindow
; Add your own affected windows to the group here

#IfWinActive ahk_group MousewheelHandler
WheelDown::WheelDown
WheelUp::WheelUp
Back to top
View user's profile Send private message
fincs



Joined: 05 May 2007
Posts: 1162
Location: Seville, Spain

PostPosted: Tue Mar 16, 2010 7:34 pm    Post subject: Reply with quote

Quote:
Code:
WheelDown::WheelDown
WheelUp::WheelUp

Wow, I'm impressed. I never thought those code lines that apparently do nothing actually fix mouse wheeling on certain kinds of mice.
_________________
fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]
Back to top
View user's profile Send private message
lexikos*
Guest





PostPosted: Wed Mar 17, 2010 2:43 am    Post subject: Reply with quote

fincs might like to know the docs wrote:
When a script is launched, each remapping is translated into a pair of hotkeys. For example, a script containing a::b actually contains the following two hotkeys instead:
Code:
*a::
SetKeyDelay -1   ; If the destination key is a mouse button, SetMouseDelay is used instead.
Send {Blind}{b DownTemp}  ; DownTemp is like Down except that other Send commands in the script won't assume "b" should stay down during their Send.
return

*a up::
SetKeyDelay -1  ; See note below for why press-duration is not specified with either of these SetKeyDelays.
Send {Blind}{b Up}
return
PLEASE NOTE, the docs wrote:
The following keys are not supported by the built-in remapping method:
  • The mouse wheel (WheelUp/Down/Left/Right).
    ...

It creates key-up hotkeys for WheelDown and WheelUp which are never executed (only the key-down hotkeys are executed). You should probably use something simpler (more transparent at least):
Code:
WheelDown::Send {WheelDown}
WheelUp::Send {WheelUp}
Code:
WheelDown::Click WD
WheelUp::Click WU
Untested.
Back to top
fincs



Joined: 05 May 2007
Posts: 1162
Location: Seville, Spain

PostPosted: Wed Mar 17, 2010 9:36 pm    Post subject: Reply with quote

That was not a sarcasm...
_________________
fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group