hi buds,
i want a macro like this:
1::
send, 1
send, 2
return
but i dont want the the 2 gets send if i press the key again in the next 5 seconds
like when i press it again after 1 second it should send without the "send, 2", and if i send it after for example 6 seconds it should send the whole script.
dont send if it was sent in last 5sec Topic is solved
Re: dont send if it was sent in last 5sec
DO YOU WANT TO SWITCh between two gun with one key if yes try this
but you must change your 1 (pick axe ) to another key i make x so you can change x in code to pick axe key do not use the same key .
~2::
~3::
~4::
~5::
~6::
~WheelDown::
~WheelUp::
return
1::
+1::
^1::
if ( A_ThisHotkey == A_PriorHotkey ) {
toggle := !toggle
} else {
toggle := True
}
if ( toggle ) {
send {x} ; is the pick axe key
} else {
send {2}
}
return
but you must change your 1 (pick axe ) to another key i make x so you can change x in code to pick axe key do not use the same key .
~2::
~3::
~4::
~5::
~6::
~WheelDown::
~WheelUp::
return
1::
+1::
^1::
if ( A_ThisHotkey == A_PriorHotkey ) {
toggle := !toggle
} else {
toggle := True
}
if ( toggle ) {
send {x} ; is the pick axe key
} else {
send {2}
}
return
Re: dont send if it was sent in last 5sec
Hallo,
try:
try:
Code: Select all
~1::
If (A_TickCount > Next2)
{
send, 2
Next2 := A_TickCount + 5000
}
return
Re: dont send if it was sent in last 5sec
perfect, rohwedder, its exactly what i was searching for
thanks a lot!
thanks a lot!
Re: dont send if it was sent in last 5sec
hi rohwedder,
i think all the time about my next question, i cant figure it out
F5::
send, 1
if the last press of the F5 button happened in the last 4 seconds:
send, 2
send, 3
return
so if i press F5 first time it should just
send 1
if i press F5 in the next 4seconds it should send
23
and reset the timer so when i press it again in the next 4 seconds it should send
23 again and again and so on
if i wait for more then 4 seconds, then it should start from beginning, like
send, 1
i hope i could explain it ;d
i think all the time about my next question, i cant figure it out
F5::
send, 1
if the last press of the F5 button happened in the last 4 seconds:
send, 2
send, 3
return
so if i press F5 first time it should just
send 1
if i press F5 in the next 4seconds it should send
23
and reset the timer so when i press it again in the next 4 seconds it should send
23 again and again and so on
if i wait for more then 4 seconds, then it should start from beginning, like
send, 1
i hope i could explain it ;d
Re: dont send if it was sent in last 5sec Topic is solved
Hallo,
try:
try:
Code: Select all
F5::
If (A_TickCount > LastF5 + 4000)
Send, 1
Else
Send, 23
LastF5 := A_TickCount
Return
Who is online
Users browsing this forum: No registered users and 38 guests