Scroll Wheel Remap - Intermittent Functionality
Posted: 13 Sep 2019, 21:56
Hello, this is my first forum post.
I'm hoping that someone could help me with an issue that I'm facing. I'm currently working on a script that remaps the scroll wheel when an executable is active. The script functions. However, the issue is that if I scroll the wheel fast enough normal wheel movements can get through. This is reliable and easily repeatable.
I've been searching for something that can fix this but I haven't found anything that works yet. I've used "A_EventInfo", as included in AHK's documentation, to check my mouse and the tooltip always shows a "1" regardless of how fast I scroll the wheel. I've done a host of other tests with other functions too. I'm thinking that is has something to do with the speed of the script but I'm not sure.
It's a very simple script so I don't know how I can speed it up; if that's what I need to do. Does anyone have any suggestions? Thanks in advance.
I'm hoping that someone could help me with an issue that I'm facing. I'm currently working on a script that remaps the scroll wheel when an executable is active. The script functions. However, the issue is that if I scroll the wheel fast enough normal wheel movements can get through. This is reliable and easily repeatable.
I've been searching for something that can fix this but I haven't found anything that works yet. I've used "A_EventInfo", as included in AHK's documentation, to check my mouse and the tooltip always shows a "1" regardless of how fast I scroll the wheel. I've done a host of other tests with other functions too. I'm thinking that is has something to do with the speed of the script but I'm not sure.
It's a very simple script so I don't know how I can speed it up; if that's what I need to do. Does anyone have any suggestions? Thanks in advance.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#InstallKeybdHook
#UseHook On
sendmode, Input
#InstallMouseHook
#UseHook On
sendmode, Input
;; comment
;; comment
;; comment
SetTitleMatchMode, 2
Hotkey, IfWinActive, ahk_exe applicationframehost.exe
Hotkey, ^WheelDown, RightPhoto
Hotkey, IfWinActive, ahk_exe applicationframehost.exe
Hotkey, ^WheelUp, LeftPhoto
return
RightPhoto:
ControlGetFocus, fcontrol, A
SendInput, {Right down}{Right up}
return
LeftPhoto:
ControlGetFocus, fcontrol, A
SendInput, {Left down}{Left up}
return
<^<#MButton::
Hotkey, ^WheelDown, toggle
Hotkey, ^WheelUp, toggle
;Suspend
;Pause
return