I have been trying to figure this out for months. For some reason images change color depending on resolution. I've tested a loop to try and find the image based on shades and/or scale size, but it loops for so long that it eventually finds an inaccurate object.
I am using an image which was screenshotted with 1920x1080p monitor. I have no luck finding the image after switching monitors to a lower resolution (1600x900), and I noticed that screenshotting the same image on both monitors changes multiple hues, saturiations, lum, and color shades.
Any help is appreciated !
Code: Select all
ImageSearch, Px, Py, 0, 0, A_ScreenWidth, A_ScreenHeight, Test1.png
If ErrorLevel
Function()
Function()
{
CoordMode, Screen
range = 240
scale = 1
shade = 1
Loop, %range%
{
shade += 1
scale += 1
; Searches for the image at incremetnal width %scale% with preserved aspect ration "h-1"
ImageSearch, Px, Py, 0, 0, A_ScreenWidth, A_ScreenHeight, *%shade% Test1.png
If !ErrorLevel
{
MouseMove, Px, Py
Break
}
Else
{
ImageSearch, Px, Py, 0, 0, A_ScreenWidth, A_ScreenHeight, *w%scale% *h-1 Test1.png
If !ErrorLevel
{
MouseMove, Px, Py
Break
}
Else
{
ImageSearch, Px, Py, 0, 0, A_ScreenWidth, A_ScreenHeight, *%shade% *w%scale% *h-1 Test1.png
If !ErrorLevel
{
MouseMove, Px, Py
Break
}
}
}
}
}