I'm looking for a script that clicks at the end of a line that has a particular color right or left of the line. I'm thinking it could be a
1x3 rectangle (ideally about 4mm height*1.2cm width) that searches around the mousepointer position and then clicks once it finds the end of the line of either color.
These are the colors of lines:
green 0x139011
red 0x10288A
Not sure if needed but these are the colors of surrounding background of the lines:
0x01FA15 grey
0x383532 lighter grey
I found this script while searching but it did not seem to work for me unfortunately.
Code: Select all
PixelSearch, Px, Py, 280, 300, 1740, 1000, 0x3296FF, 0, Fast
MouseMove, %Px%, %Py%
Sleep, 50
{
Label9000:
MouseMove, 1, 0, 0, R ; Move the mouse to next pixel and check its color again.
MouseGetPos X, Y
PixelGetColor, Color, %X%, %Y%, RGB
{
If (Color = 0xE0E0E0, 1, Fast)
{
MouseClick, left
}
If (Color = 0xE7E7E7, 1, Fast)
{
MouseClick, left
}
Else
{
Goto, Label9000
}
}
}
Return ; Stop execution of this thread.