Delay numlock

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 20 Oct 2017, 23:20

Delay numlock

20 Oct 2017, 23:28

I want a code that doesn't do anything if numlock is pressed but if it is held down for like 5 seconds then it still can send numlock. Is there any way to write code for this, I tired using SetKeyDelay but had no success. Any help would be appreciated!
User avatar
Posts: 1101
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: Delay numlock

21 Oct 2017, 04:03

Code: [Select all] [Download] GeSHi © Codebox Plus

Keywait, NumLock, T5
if ErrorLevel ;timeout -> button held
SetNumLockstate,% GetKeyState("NumLock","T") ? "Off" : "On"
The more I know:
The more I know,
I know nothing.

Return to “Ask For Help”

Who is online

Users browsing this forum: arochon and 9 guests