for example: i want to push R release R, after that i push T release T and in the outcome i would like to send me the letter U
but if after pushing and releasing the letter R, i push and release the letter G i want that this sequence becomes canceled, so if after G, i push/release the letter T, it doesnt send me the letter U
(Pd: Im spanish but im posting in the english forums too because theres not much spanish people who knows about AHK, sorry about the translation by the way)
Somebody knows how to make a sequence without holding? Topic is solved
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Somebody knows how to make a sequence without holding?
Last edited by BoBo on 12 Jun 2021, 23:43, edited 1 time in total.
Reason: Moved to Gaming section.
Reason: Moved to Gaming section.
Re: Somebody knows how to make a sequence without holding?
Code: Select all
r Up::
on := True
SoundBeep, 1500
Return
#If on
t Up::
Send u
g Up::
on := False
SoundBeep, 1000
Return
#If
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Re: Somebody knows how to make a sequence without holding?
amazing thank you very much!
but, when i press R doesnt show up... and the T doesnt show up after the r
is there a way to do it?
edit: i think i finally did it like this[Mod edit: [code][/code] tags added.]
edit2: now i have a problem with the R & F:U command
it doesnt let me put rrrrrr when i press R only one r in the release, i think the "&" its bugged with the "If" command, is there a way to fix it?
but, when i press R doesnt show up... and the T doesnt show up after the r
is there a way to do it?
edit: i think i finally did it like this
Code: Select all
r::
{
Send {r}
return
}
t::
{
Send {t}
return
}
g::
{
Send {g}
return
}
r Up::
on := True
Return
#If on
t Up::
Send u
g Up::
on := False
Return
#If
edit2: now i have a problem with the R & F:U command
it doesnt let me put rrrrrr when i press R only one r in the release, i think the "&" its bugged with the "If" command, is there a way to fix it?
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Re: Somebody knows how to make a sequence without holding?
uhmm now i have a problem.... when i want to add
R & F::U
it bugs and doesnt let me write rrrrrrrrrrr while pressing R and only when i release puts one r
if i dont put these "R & F::U" it doesnt bug, why its happening?
R & F::U
it bugs and doesnt let me write rrrrrrrrrrr while pressing R and only when i release puts one r
if i dont put these "R & F::U" it doesnt bug, why its happening?
Re: Somebody knows how to make a sequence without holding? Topic is solved
OK. The following might be easier.
Code: Select all
~r Up::
on := True
SoundBeep, 1500
Return
#If on
~t Up::
Send u
~g Up::
on := False
SoundBeep, 1000
Return
#If
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Re: Somebody knows how to make a sequence without holding?
i dont know what this symbol ~ means but you are a god, thank you very much you solved my bug, scripting and learning is so interesting im beginning in this
Re: Somebody knows how to make a sequence without holding?
Good to hear. The tilde simply avoids blocking the native function. To the user, this has the effect of "sending the key through".
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Re: Somebody knows how to make a sequence without holding?
uhmmmmm now im testing 2 times IF command in the same script, but doesnt let me do it digitally only physycal when i press g (i made this for auto start from 0 with F or R)
should i make 2 ahk files for 2 differents IF?
[Mod edit: [code][/code] tags added.]
should i make 2 ahk files for 2 differents IF?
Code: Select all
f::
{
Send {g}
return
}
~r Up::
on := True
Return
#If on
t Up::
Send u
~g Up::
on := False
Return
#If
r::
{
Send {g}
return
}
~f Up::
on := True
Return
#If on
t Up::
Send j
~g Up::
on := False
Return
#If
Last edited by gregster on 12 Jun 2021, 17:30, edited 1 time in total.
Reason: Please use [code] tags. Thank you!
Reason: Please use [code] tags. Thank you!
Re: Somebody knows how to make a sequence without holding?
One possibility is below.
Alternatively:
Code: Select all
r::
f::Send g
~r Up::
on := True
SoundBeep, 1500
Return
#If on
t Up::
Send u
~g Up::
on := False
SoundBeep, 1200
Return
#If
~f Up::
on2 := True
SoundBeep, 1000
Return
#If on2
t Up::
Send j
~g Up::
on2 := False
SoundBeep, 700
Return
#If
Code: Select all
$t::Send % A_PriorKey = "r" ? "u" : A_PriorKey = "f" ? "j" : "t"
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Re: Somebody knows how to make a sequence without holding?
Code: Select all
$t::Send % A_PriorKey = "r" ? "u" : A_PriorKey = "f" ? "j" : "t"
Code: Select all
r::
f::Send g
~r Up::
on := True
SoundBeep, 1500
Return
#If on
t Up::
Send u
~g Up::
on := False
SoundBeep, 1200
Return
#If
~f Up::
on2 := True
SoundBeep, 1000
Return
#If on2
t Up::
Send j
~g Up::
on2 := False
SoundBeep, 700
Return
#If
(and if i want to make R+R instead R+T i just get the same problem, when i change to F it doesnt stop the sequence)
But dont worry i fixed the problem making 2 independent files, and it works awesome, you helped me a lot thank you so much!
Re: Somebody knows how to make a sequence without holding?
OK. I was only guessing, because you did not describe the intended effect. In any case, "on" is just a variable name, so you can call it just about anything, "jimbo_39x" or whatever. Variables are global by default, so when you need to track separate things, you need different variable names. To "send the key through", precede the hotkey with tilde; its native function will otherwise be blocked. I don't think you need two scripts, but if it works, it works. Keep in mind that two processes that use a keyboard hook can conflict with each other. Best of luck.
-
- Posts: 15
- Joined: 11 Jun 2021, 12:31
Re: Somebody knows how to make a sequence without holding?
i wanted a custom macro made by myself for a game called fortnite, you know it has a lot of buttons so i made it to reduce some buttons for be less stressfullmikeyww wrote: ↑12 Jun 2021, 20:55OK. I was only guessing, because you did not describe the intended effect. In any case, "on" is just a variable name, so you can call it just about anything, "jimbo_39x" or whatever. Variables are global by default, so when you need to track separate things, you need different variable names. To "send the key through", precede the hotkey with tilde; its native function will otherwise be blocked. I don't think you need two scripts, but if it works, it works. Keep in mind that two processes that use a keyboard hook can conflict with each other. Best of luck.
i finished my script (i think), and they dont conflict while im playing, thats a good signal
thank you mikeyww!
Who is online
Users browsing this forum: No registered users and 21 guests