Search the Community
Showing results for tags 'pixel pixelsearch autoit auto'.
-
Hello! Can someone help me understand the basics input parameters for PixelSearch. Reading the help guide Parameters left left coordinate of rectangle. top top coordinate of rectangle. right right coordinate of rectangle. bottom bottom coordinate of rectangle. color Color value of pixel to find (in decimal or hex). shade-variation [optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the color. Default is 0 (exact match). step [optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1. It is not recommended to use a step value greater than 1. hwnd [optional] Window handle to be used. Default is the desktop window If I want to search a rectangle inside the center of my desktop, using the WindowInfo tool from auto it, read the x and y mouse coordinates and use those as the values for the parameters? For this example lets say my screen resolution is 1920x1240. Drawing a search rectangle inside, for easy math will say it's 3/4th of the size of the full desktop. Now using the wininfo tool, I find the x and y of where I want the corner of the box to start. Mouse cords (480,930) and using the wininfo tool ill find the x,y of the opposite corner I want the box to end. (1440,310) The values of the pixelsearch function should be, (searching on red) Pixelseach Local $aCoord = PixelSearch(480, 930, 1440, 310, 0xFF0000) Is that correct?