would anyone please help me,
i am planning to make a hotkey but sending 3 different keys
like this
$~LButton::1 / Send 1
$~LButton::r / Send r
$~LButton::r / Press R For a Few Sec
is this possible?
Thanks in Advance
Send Multiple Key On 1 Hotkey
Re: Send Multiple Key On 1 Hotkey
Hallo,
this:is a Remapping (with an unnecessary $), not a Hotkey!
Do you want something like this Hotkey?
this:
Code: Select all
$~LButton::1
Do you want something like this Hotkey?
Code: Select all
~*LButton::
Send 1
Send r
Send {Shift Down}{r Down}
KeyWait, LButton
Send {r Up}{Shift Up}
Return
Re: Send Multiple Key On 1 Hotkey
first of all thanks for the help.
first 2 are working good
but my problem is when i press the Lbutton 3rd Time it wont Hold The KeyDown.
im working on something like:
when i press Lbutton it will send 1, then 2nd time i press it will send r, then 3rd time it will hold down the 3 button until i release the Lbutton.
is this possible?
also i want to put interval like 10 seconds holding down the send 1 button.
sorry for my bad english.
first 2 are working good
but my problem is when i press the Lbutton 3rd Time it wont Hold The KeyDown.
im working on something like:
when i press Lbutton it will send 1, then 2nd time i press it will send r, then 3rd time it will hold down the 3 button until i release the Lbutton.
is this possible?
also i want to put interval like 10 seconds holding down the send 1 button.
sorry for my bad english.
Re: Send Multiple Key On 1 Hotkey
Hallo,
try this (also to understand!):
try this (also to understand!):
Code: Select all
~*LButton::
Counter:=Mod(0 Counter+1,4) ;counts: 0,1,2,3,0,1,2...
If Counter = 0
Send 1
Else If Counter = 1
Send r
Else If Counter = 2
{ ;holding button 3 until Lbutton is released
Send {3 Down}
KeyWait, LButton
Send {3 Up}
}
Else ;Counter = 3
{ ;10 seconds holding button 1
Send {1 Down}
SetTimer 1Up, -10000 ;10000ms non-periodic
}
Return
1Up:
Send {1 Up}
Return
Re: Send Multiple Key On 1 Hotkey
~*LButton::
Counter:=Mod(0 Counter+1,4) ;counts: 0,1,2,3,0,1,2...
If Counter = 0
Send 1
Else If Counter = 1
Send r
Else If Counter = 2
{ ;holding button 3 until Lbutton is released
Send {r Down}
KeyWait, LButton
Send {r Up}
}
Else ;Counter = r
{ ;10 seconds holding button 1
Send {1 Down} <----- What Are This For?
SetTimer 1Up, -10000 ;10000ms non-periodic
}
Return
1Up:
Send {1 Up} <----- What Are This For?
Return
Thank You Very Much Sir.
Finally Its Working, but i have a few Questions, sorry im still new.
Counter:=Mod(0 Counter+1,4) ;counts: 0,1,2,3,0,1,2...
If Counter = 0
Send 1
Else If Counter = 1
Send r
Else If Counter = 2
{ ;holding button 3 until Lbutton is released
Send {r Down}
KeyWait, LButton
Send {r Up}
}
Else ;Counter = r
{ ;10 seconds holding button 1
Send {1 Down} <----- What Are This For?
SetTimer 1Up, -10000 ;10000ms non-periodic
}
Return
1Up:
Send {1 Up} <----- What Are This For?
Return
Thank You Very Much Sir.
Finally Its Working, but i have a few Questions, sorry im still new.
Re: Send Multiple Key On 1 Hotkey
Hallo,
10 seconds holding button 1, means:
"Send {1 Down}", "Wait 10 seconds", "Send {1 Up}".
Here, "Wait 10 seconds" and "Send {1 Up}" was performed by a non-periodic timer with the label "1Up".
https://autohotkey.com/docs/commands/SetTimer.htm
10 seconds holding button 1, means:
"Send {1 Down}", "Wait 10 seconds", "Send {1 Up}".
Here, "Wait 10 seconds" and "Send {1 Up}" was performed by a non-periodic timer with the label "1Up".
https://autohotkey.com/docs/commands/SetTimer.htm
Who is online
Users browsing this forum: Bing [Bot], mikeyww and 133 guests