Code: Select all
q::
KeyWait, %A_ThisHotkey%, T0.75
errorlevel ? Function1() : Function(2)
return
Code: Select all
q::
KeyWait, %A_ThisHotkey%, T0.75
errorlevel ? Function1() : Function(2)
return
Code: Select all
q::
KeyWait, %A_ThisHotkey%, T0.75
errorlevel ? Function(2) : Function(2) ;ding/no ding
return
Code: Select all
q::
KeyWait, %A_ThisHotkey%, T0.75
errorlevel ? Function(1) : Function(2)
return
Function(n) {
ToolTip, % n
}
Code: Select all
q::
KeyWait, %A_ThisHotkey%, T0.75
errorlevel ? Function(1) : Function(2)
return
Function(n) {
msgbox, 4096, OK, % n
}
I can hold it for a very long time (10 seconds or more), and still no ding. I tried your script with the MsgBox as well and it's the same thing.PuzzledGreatly wrote: ↑ Thanks boiler, I tried your code and got a ding. How long did you hold the key for?
Code: Select all
MsgBox, 32, Ding?, Does this MsgBox produce a ding?
Code: Select all
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
#Persistent
#SingleInstance force
Gui, New, -dpiscale -caption border, Ding Tester
Gui, font, s20 bold
Gui, add, text, w600 center, Do you hear a ding when you press q?
Gui, add, text, w600 center, Do you hear a ding pressing other keys?
Gui, show, xcenter y200
return
q:: MsgBox, 32, Ding?, Does this MsgBox produce a ding?
esc:: exitapp
Yes, same here. Ding with any letter key except q.PuzzledGreatly wrote: ↑ With the following script I get a ding with any letter key except q. Do you?
Code: Select all
q::
keywait q
a_timeSinceThisHotkey > 750 ? function1() : function2()
return
function1() {
msgbox, function1
}
function2() {
msgbox, function 2
}
Code: Select all
Gui, Add, Text, TEST
Gui, Show, w300, Test
Users browsing this forum: Google [Bot] and 269 guests