Numpad 00 'might' cause error

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
s_adavan
Posts: 62
Joined: 10 Nov 2020, 06:31

Numpad 00 'might' cause error

Post by s_adavan » 25 Jun 2022, 23:44

Hi,

this is more of a report and a follow up from previous topic: viewtopic.php?f=76&t=104413
it is no longer a question. I made it as a new topic, because the previous one was too chaotic.

So my numpad had become stable (normal) for about a month, after the last post about the incident.
Last week though, I tried to tinker a bit and it snapped again. This is the third time.

I think the cuplrit might be the numpad00. although I can't be too sure.

Code: Select all

#MaxThreadsPerHotkey 5  				;'Allow multiple threads for this hotkey'
	$0::
	#MaxThreadsPerHotkey 1
	SetBatchLines, 100
	DelayBetweenKeys = 80
	if A_PriorHotkey = %A_ThisHotkey%
	{
		if A_TimeSincePriorHotkey < %DelayBetweenKeys%
		{
			if KeyCount =
			{
				KeyCount = 1
			}
			else
			{
				KeyCount = 0		
				Send, 1					;'when a modifier key is pressed, this works only once, not on repeat'
			}
		CalledReentrantly = y
		return
		}
	}
	KeyCount = 0
	CalledReentrantly = n
	Sleep, %DelayBetweenKeys%
	if CalledReentrantly = y
	{
		CalledReentrantly = n
		return
	}
	Send, 0
	return	
I had this in my script for about 1.5 year now and I rarely used it.
if not mistaken, I got this from the official autohotkey documentation. Strangely, when I tried to find it just now, I could not find it.

As of now, my external numpad is completely fine.
what I did was, delaying all the keys that errorly appear along the 'numpadenter', so they unable to appear. use and press it as usual.
After sometime, the effect wears off and it returns to normal (after about five days).

the inexplicable horror:
1. how the error still lingers, even the script is suspended, or even after computer shut down/ restart.
2. and also, why it only happens recently. (probably bad luck, coincidence)

I'm posting this, so if someone got the same problem and try to search, this might give some hint.
Because for normal-user like me, ' :rainbow: who doesn't tinker with scripting on regular basis :rainbow: ',
this kind of disaster can be frightening enough I assure you it can paralyze both mind and body.

whether it is hardware of software problem, I can safely state this: it is not entirely on the hardware.

feel free to move this post where it should. I'm not sure where it should go if here is not the right one.

alright, I'll leave this here. :beer:

Return to “Ask for Help (v1)”