It's working perfectly, but it's stopping with any key pressed.
If I remove return from each send command, the problem disapear. But I lost a lot speed doing that. So I need to keep it.
Dear friends, do you have any idea?
Thank you!
Code: Select all
#NoEnv
#KeyHistory 0
#SingleInstance, Force
Process, Priority, , H
SetBatchLines, -1
SetKeyDelay, -1, -1
SetWinDelay, -1
ListLines Off
SendMode Input
CoordMode, Pixel, Window
$1::
While (GetKeyState("1", "P")) {
PixelGetColor, color, 1227, 1289, RGB
If color = 0x726408
{
Send, 1
return
}
PixelGetColor, color, 1249, 1254, RGB
If color = 0xE99D16
{
Send, 2
return
}
PixelGetColor, color, 1245, 1257, RGB
If color = 0xDBD29A
{
Send, 3
return
}
PixelGetColor, color, 1256, 1276, RGB
If color = 0x33B7BA
{
Send, 4
return
}
PixelGetColor, color, 1237, 1273, RGB
If color = 0xFFF063
{
Send, 5
return
}
PixelGetColor, color, 1251, 1275, RGB
If color = 0x532010
{
Send, 6
return
}
PixelGetColor, color, 1238, 1274, RGB
If color = 0xCCBD82
{
Send, 7
return
}
PixelGetColor, color, 1269, 1274, RGB
If color = 0xFCEE72
{
Send, 8
return
}
PixelGetColor, color, 1230, 1253, RGB
If color = 0x00092B
{
Send, 9
return
}
}
Return