How to listen/detect Mouse WheelUp/Down stop-event?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
pythonker
Posts: 32
Joined: 11 May 2016, 07:28

How to listen/detect Mouse WheelUp/Down stop-event?

15 Nov 2019, 05:33

How to make this function possible in AHK, which needs to listen/detect Mouse WheelUp/Down stop-event?

Use continuous wheel up to enter letter a in notepad.exe, when wheel stops, enter letter b?

e.g.
ab
aab
aaab
aaa.....aaab

And not
ba
baa
baaa
baaa.....aaa
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to listen/detect Mouse WheelUp/Down stop-event?

15 Nov 2019, 06:38

Hallo,
there's nothing to listen to.
https://www.autohotkey.com/docs/Hotkeys.htm#Wheel
Finally, since mouse wheel hotkeys generate only down-events (never up-events), they cannot be used as key-up hotkeys.
User avatar
boiler
Posts: 16960
Joined: 21 Dec 2014, 02:44

Re: How to listen/detect Mouse WheelUp/Down stop-event?

15 Nov 2019, 08:03

Try this:

Code: Select all

WheelUp::
	Send, a
	SetTimer, WheelCheck, 50
return

WheelCheck:
	if (A_TimeSincePriorHotkey > 100)
	{
		SetTimer, WheelCheck, Off
		Send, b
	}
return
pythonker
Posts: 32
Joined: 11 May 2016, 07:28

Re: How to listen/detect Mouse WheelUp/Down stop-event?

17 Nov 2019, 20:09

boiler wrote:
15 Nov 2019, 08:03
Try this:

Code: Select all

WheelUp::
	Send, a
	SetTimer, WheelCheck, 50
return

WheelCheck:
	if (A_TimeSincePriorHotkey > 100)
	{
		SetTimer, WheelCheck, Off
		Send, b
	}
return
The Timer is Great, Thanks very much!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, mikeyww, PsysimSV and 300 guests