Hi, Fellow Internet stranger
I need help with simple command
when i press key X I want to press key A
x::
Send, a
return
I think... pretty simple right? well heres the part that is prob simple but i cant find it or logically do it myself
when i press key X I want to press key A
but when i press key X again, i want to make it press key B
3rd time key C
4th time key D
5th time key E
and reset for key A
so on...
btw, I dont mean double click, tripple etc...
Can someone possibly help me? ty
was using some macro editor of my mouse when i needed macros in the past, but i dont think this task can be done in "oscar editor" if you think you can do it in this simple enviroment then prove me wrong, i am looking forward to it
Really simple stuff - Diffrent outcomes of pressing one button second time
-
- Posts: 860
- Joined: 21 Dec 2015, 02:34
Re: Really simple stuff - Diffrent outcomes of pressing one button second time
Code: Select all
z::
count++
If (count=1)
{
msgbox, 1
}
If (count=2)
{
msgbox, 2
}
If (count=3)
{
msgbox, 3
}
If (count=4)
{
msgbox, 4
Count=0
}
Return
Re: Really simple stuff - Diffrent outcomes of pressing one button second time
In a shorter form:
or
Code: Select all
cnt := 0, chars := StrSplit("ABCDE") ; if you change the chars the script will cycle for all the char listed
x::
send, % chars[mod(cnt++,chars.MaxIndex())+1]
Return
Code: Select all
send, % cnt++ >= chars.MaxIndex() ? chars[cnt:=1] : chars[cnt]
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Who is online
Users browsing this forum: Descolada and 309 guests