LEARNING AHK for learning purposes need help
LEARNING AHK for learning purposes need help
Hey there AHK Community I got a question and need a little help I'm new with AHK and have been reading all of the HOW TO Doc's posted by AHK them selves but having troubles finding a good learning how to on binding the "Number 1 key" to the "/? key" down by ur right shift on your keybored I wanna be able to press "?/ key" to toggle the "number 1 key" up and down when "?/" is pressed would anyone by any chance already have a simple code wrote that can do that or a better learning link that would be helpful thanks again AHK community for reading and helping
Re: LEARNING AHK for learning purposes need help
Update Ive got the code down and its working but if anyone could fix it to make it better and randomize that would be great heres what i got down for now
[Mod edit: [code][/code] tags added.]
Code: Select all
repeating1 = 0
/::
if (repeating1 = 0)
{
repeating1 = 1
SetTimer, repeat1, 200
}
else
{
repeating1 = 0
SetTimer, repeat1, Off
}
return
repeat1:
send, 1
Re: LEARNING AHK for learning purposes need help
You could provide a description of what you would like to happen. "Randomize" is not enough information to code.
-
- Posts: 4
- Joined: 05 May 2021, 12:42
Re: LEARNING AHK for learning purposes need help
sorry i didnt mean randomize but i meant to keep it toggled down and not spammin 1 1 1 id rather have it where you hold the key down and then take my finger off to untoggle has of right now im using it and it just keeps pressing1, 1, 1, 1 like that
Re: LEARNING AHK for learning purposes need help
A toggle:
Plain hold:
Code: Select all
/::Send % (on := !on) ? "{1 down}" : "{1 up}"
Code: Select all
/::
Send {1 down}
KeyWait, /
Send {1 up}
SoundBeep, 1000
Return