Code works for windows (desktop) who has the colorvalue but not in the game.
Im using the colorvalue's pixelposition found by printscreen, ingame. Position of searched pixel and its color was found using Paintshop.
eh, the game runs if full screen mode .
Anyone can helpout here? Code below.
Code: Select all
#SingleInstance, force #InstallKeybdHook #InstallMouseHook DetectHiddenWindows, On CoordMode, Mouse, Relative ; needed for mouseclickdrag ; CoordMode, Tooltip, Screen targetcolor = 0xF6F6F6 WinActivate, XXXX XXXX WinSet, AlwaysOnTop, ON, XXXX XXXX !j:: loopen: PixelSearch, Px, Py, 99, 1014, 102, 1016, 0xf6f6f6, 3, Fast if ErrorLevel goto, loopen else MsgBox, A color within 3 shades of variation was found at X%Px% Y%Py% WinSet, AlwaysOnTop, OFF, XXXX XXXX !^r:: MainGuiClose: if (winid !="") ; Turn off AllwaysOnTop in case script is closed while test is running. WinSet, AlwaysOnTop, OFF, XXXX XXXX ExitApp return