Movement Script:
Code: Select all
~Joy10::pause
~*$Joy9::
loop
{
send, {d down}
sleep 123
send, {d up}
sleep 123
send, {a down}
sleep 231
send, {a up}
sleep 123
}
return
Clicks Scripts using PixelGetColor
Code: Select all
~Joy10::pause
~*$Joy9::
Loop
{
PixelGetColor, Pix1, 123, 123
if Pix1= COLOR1
{
sleep 1000
PixelGetColor, Pix2, 456, 456
if Pix2= COLOR2
{
MouseClick, left, 321, 321
}
else if Pix2 != COLOR2
{ ;
MouseClick, left, 345, 345
}
else
{
Sleep, 1234
}
}
}
return
They work on two .ahk files and work perfect even with the same hotkey (they don't need each other to work), but don't know how to make them work in one file (with the same hotkey aslo)
Thank you in advance.