Speed typing error

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
aweinberg
Posts: 52
Joined: 08 Feb 2019, 15:38

Speed typing error

11 Feb 2019, 23:14

When I type fast with this script. It ads a space so is i type no it is n o or on unless I type really slow how do you recommend I fix that?

$n::
KeyWait,n,T0.5 ;wait 0.5 seconds for release key
If (ErrorLevel) ;more than 0.5 sec have passed
{
Run C:\Windows\System32\Notepad
KeyWait,n ;prevent sending n after notepad opened
}
Else ;less than .5 sec have passed
{
Send,n
}
Return
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Speed typing error

11 Feb 2019, 23:54

Something like this maybe?

Code: Select all

$n::nt:=a_msec
$n up::
if(a_msec-nt>500)
    run C:\Windows\System32\Notepad
else
    send,n
return
It will only open notepad after n is released.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
aweinberg
Posts: 52
Joined: 08 Feb 2019, 15:38

Re: Speed typing error

12 Feb 2019, 00:24

Thanks for the reply I fixed it

$n::
SendInput n
KeyWait,n,T.5 ;wait .5 seconds for release key
If (ErrorLevel) ;more than .5 sec have passed
{
SendInput,{Ins}
Run C:\Windows\System32\Notepad
KeyWait,n ;prevent sending n after notepad opened
}
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, peter_ahk and 346 guests