Hi all
I'm at a loss here.
Purpose of script:
Combination of Shift resp. Alt with WheelDown resp. WheelUp to send Arrow Up/Down command to specific Control.
Solution 1. Works, but is not quite fast and reliable enough to be used in conjunction with further commands beneath it:
!WheelDown::
ControlFocus WindowsForms10.EDIT.app.0.141b42a_r12_ad13, Subtitle Edit 3.5.1
Send, {Down}
return
Solution 2. Much faster and sufficiently reliable when tested with a different hotkey, like Numpad4 . The problem is, however, that the shortcuts built into the software are not overridden anymore, as opposed to Solution 1, so it doesn't work with the mousewheel:
!WheelDown::
Numpad4::
ControlSend, WindowsForms10.EDIT.app.0.141b42a_r12_ad13, {Down}, Subtitle Edit 3.5.1
return
Why does the override for the built-in shortcuts work with solution 1 but not with solution 2?
Any pointers will be much appreciated.
Best regards.
inconsistent shortcut override by mouse wheel w/ controlsend
-
- Posts: 2
- Joined: 02 Apr 2017, 08:59
Re: inconsistent shortcut override by mouse wheel w/ controlsend
the best bet i think is to run the script as admin or try a different send command other then that i dont know :/
Re: inconsistent shortcut override by mouse wheel w/ controlsend
I have had this problem with the game Battlefield 2. It kept seeing the hotkeys I pressed, which should be supressed by AutoHotkey.
Only way to fix it to my knowledge is change the hotkey of the program so they are not the same anymore.
Only way to fix it to my knowledge is change the hotkey of the program so they are not the same anymore.
Re: inconsistent shortcut override by mouse wheel w/ controlsend
Games often read the mouse at a level that is lower that AHK blocks them at.
However, I HAVE successfully used wheel remapping scripts with BF in the past, so I suspect something else may be the problem.
Out of interest, if you do this, does the game still see the wheel roll?
If this does stop the game from seeing the wheel roll, then you could do this:
Or, if you wish to preserve normal wheeldown functionality if ALT is not held, then use:
However, I HAVE successfully used wheel remapping scripts with BF in the past, so I suspect something else may be the problem.
Out of interest, if you do this, does the game still see the wheel roll?
Code: Select all
WheelDown::
return
If this does stop the game from seeing the wheel roll, then you could do this:
Code: Select all
*WheelDown:: ; * = still fire hotkeys, even if modifier is also held (ie will still trigger on ALT+Wheeldown, or ALT+CTRL+WheelDown)
if (GetKeyState("Alt", "P")){
; Only do this if ALT is also held
ControlSend, WindowsForms10.EDIT.app.0.141b42a_r12_ad13, {Down}, Subtitle Edit 3.5.1
}
Code: Select all
$*WheelDown:: ; * = still fire hotkeys, even if modifier is also held (ie will still trigger on ALT+Wheeldown, or ALT+CTRL+WheelDown)
if (GetKeyState("Alt", "P")){
; Only do this if ALT is also held
ControlSend, WindowsForms10.EDIT.app.0.141b42a_r12_ad13, {Down}, Subtitle Edit 3.5.1
} else {
Send {Blind}{WheelDown}
}
Re: inconsistent shortcut override by mouse wheel w/ controlsend
Thanks for your help with Battlefield 2.
The scroll wheel works perfecly with your first script active though... Also the d::Return does not make a difference. I can still walk sideways.
How did you fixed it?
The scroll wheel works perfecly with your first script active though... Also the d::Return does not make a difference. I can still walk sideways.
How did you fixed it?
Re: inconsistent shortcut override by mouse wheel w/ controlsend
OK, so if WheelDown::return did not block the game from seeing the mouse wheel, then no AHK hotkey is.
You would need to use low-level mouse hooks or something
You would need to use low-level mouse hooks or something
Who is online
Users browsing this forum: Spawnova and 290 guests