How to change this behavior ?
Code: Select all
Hotkey, t , Test , On
return
Test:
Counter += 1
Tooltip, % Counter , 0 , 0
;KeyWait, t ; This will work, but i want without this method
return
Code: Select all
Hotkey, t , Test , On
return
Test:
Counter += 1
Tooltip, % Counter , 0 , 0
;KeyWait, t ; This will work, but i want without this method
return
Code: Select all
Hotkey, $t, Test, On
Hotkey, $t up, NoTest, On
return
Test:
Counter += 1
Tooltip, % Counter, 0, 0
; Sleep, 300 ; if you want a delay
return
NoTest:
Counter = 0
Tooltip
return
Code: Select all
Goto, t UP
t UP::Hotkey, t , Test , On
Test:
Hotkey, t , Return
Counter += 1
Tooltip, % Counter , 0 , 0
Return:
return
Counter still increases when you hold key, this is not what im askedGEV wrote: ↑03 Oct 2022, 04:07without while loop:Code: Select all
Hotkey, $t, Test, On Hotkey, $t up, NoTest, On return Test: Counter += 1 Tooltip, % Counter, 0, 0 ; Sleep, 300 ; if you want a delay return NoTest: Counter = 0 Tooltip return
Yes, it will work, but the request is different, need to change the behavior, for example, how directives do it, in your method you need to resort to constant binds, this is bad wayRohwedder wrote: ↑03 Oct 2022, 08:09Hallo,
try:Code: Select all
Goto, t UP t UP::Hotkey, t , Test , On Test: Hotkey, t , Return Counter += 1 Tooltip, % Counter , 0 , 0 Return: return
Code: Select all
#InstallKeybdHook
Hotkey, t , Test , On
t Up::KeyHistory
Test:
Counter += 1
Tooltip, % Counter , 0 , 0
return
Code: Select all
Hotkey, RButton , Test , On
return
Test:
Counter += 1
Tooltip, % Counter , 0 , 0
return