inconsistent shortcut override by mouse wheel w/ controlsend

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
SlipperyGrams
Posts: 2
Joined: 02 Apr 2017, 08:59

inconsistent shortcut override by mouse wheel w/ controlsend

02 Apr 2017, 09:37

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.
User avatar
SnowFlake
Posts: 368
Joined: 28 Apr 2015, 05:41
Contact:

Re: inconsistent shortcut override by mouse wheel w/ controlsend

11 Apr 2017, 15:58

the best bet i think is to run the script as admin or try a different send command other then that i dont know :/
:yawn:
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: inconsistent shortcut override by mouse wheel w/ controlsend

13 Apr 2017, 09:14

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.
User avatar
evilC
Posts: 4824
Joined: 27 Feb 2014, 12:30

Re: inconsistent shortcut override by mouse wheel w/ controlsend

13 Apr 2017, 11:47

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?

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
	}
Or, if you wish to preserve normal wheeldown functionality if ALT is not held, then use:

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}
	}
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: inconsistent shortcut override by mouse wheel w/ controlsend

13 Apr 2017, 12:21

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?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee and 208 guests