I would like to kindly ask help regarding this code:
Code: Select all
5::
SendInput m
Sleep 20
SendInput m
Sleep 500
loop,
{
SendInput u
Sleep 20
SendInput l
Sleep 20
SendInput y
Sleep 20
} <---- when 5 is pressed only the commands above will be inputted.
SetTimer, Loops, -1 <--- however these codes also gets inputted when I press 5, which I don't want it to do when I press 5.
$4::Loop = 4
$e::Loop = e
$s::Loop = s
$q::Loop = q
$r::Loop = r
$x::Loop = x
Loops:
Loop
{
While, Loop = "x"
{
SendInput m
Sleep 80
SendInput m
Sleep 80
}
While, Loop = "e"
{
SendInput m
Sleep 20
SendInput m
Sleep 20
SendInput u
Sleep 20
SendInput u
Sleep 20
SendInput l
Sleep 20
SendInput y
Sleep 20
}
While, Loop = "4"
{
SendInput y
Sleep 20
SendInput l
Sleep 20
}
While, Loop = "r"
{
SendInput u
Sleep 20
SendInput u
Sleep 20
SendInput l
Sleep 20
SendInput y
Sleep 20
SendInput u
Sleep 20
}
While, Loop = "s"
{
break
}
While, Loop = "q"
{
SendInput l
Sleep 30
}
}
Return
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
[Mod edit: Moved topic from AHK v2 help since this is v1 code.]