Hello,
What is the best way to make 2 buttons pressed at the same time ( Time delay between 2 presses is as short as possible)?
Press 2 buttons at the same time? Topic is solved
Re: Press 2 buttons at the same time?
make 2 labels
label1:
send {K Down}
send {K up}
return
label2:
send {K Down}
send {K up}
return
*~$n::
{
gosub label1
gosub label2
}
label1:
send {K Down}
send {K up}
return
label2:
send {K Down}
send {K up}
return
*~$n::
{
gosub label1
gosub label2
}
Re: Press 2 buttons at the same time?
Hallo,
let two scripts run at the same time.
F4 presses a and b almost simultaneously.
A.ahk:B.ahk:
(If pressing F4 is bothering, use a third script to mask F4)
F4.ahk:
But this simultaneity is unnecessary!
I recommend you:
Key a presses a and b:
let two scripts run at the same time.
F4 presses a and b almost simultaneously.
A.ahk:
Code: Select all
~F4::a
Code: Select all
~F4::b
F4.ahk:
Code: Select all
F4::Return
I recommend you:
Key a presses a and b:
Code: Select all
~a::b
Re: Press 2 buttons at the same time?
Technically if the purpose of this is to trigger two actions that you want to go simultaneously then Send, {a}{b} should do the job. There's hardly any delay.
Of course you can do what rohwedder did too. The problem with ~a::b is that the hotkey will be triggered when a is pressed as well!
Of course you can do what rohwedder did too. The problem with ~a::b is that the hotkey will be triggered when a is pressed as well!
I am your average ahk newbie. Just.. a tat more cute.
Re: Press 2 buttons at the same time?
It really depends on what you mean by "Press at the same time".
As Nwb says Send, {a}{b} will send keys quickly, but using that, at no point are the two keys "held" simultaneously (It presses, then releases each key in sequence).
If you truly want to hold two keys at the same time, you would want Send, {a down}{b down}{b up}{a up}
As Nwb says Send, {a}{b} will send keys quickly, but using that, at no point are the two keys "held" simultaneously (It presses, then releases each key in sequence).
If you truly want to hold two keys at the same time, you would want Send, {a down}{b down}{b up}{a up}
Who is online
Users browsing this forum: No registered users and 31 guests