I need help with a Radar code to search the Color of a pixel
Posted: 01 Feb 2023, 02:27
I asked ChatGpt AI this question:
The syntax is all messed up and everytime I ask the AI does not understand me. I cannot ask the AI more questions now as I got a 1hr suspension for "asking too much"
Perhaps someone here can help me with this problem.
The AI answer yes and gave me this codeis it possible to make a code in AHK that acts like a radar to search a pixel with color 0xFF0000 in a circle that changes radius and whose center is (108,521)
Code: Select all
Loop
{
for (radius = 1; radius <= 100; radius++)
{
for (angle = 0; angle < 360; angle++)
{
x := 108 + radius * Cos(angle)
y := 521 + radius * Sin(angle)
color := PixelGetColor(x, y)
if (color = 0xFF0000)
{
MsgBox Pixel found!
break 2
}
}
}
Sleep, 1000
}
Perhaps someone here can help me with this problem.