Changes between Initial Version and Version 1 of Ticket #3977, comment 1


Ignore:
Timestamp:
10/19/23 13:34:51 (13 months ago)
Author:
Jos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3977, comment 1

    initial v1  
    11Please post this in the forum so we can have a discussion on it first as there are some things to discuss.
    22Closed for now until we have figured out what is happening.
     3This script helps you to debug, where you will see that the mouse pos is 1 pixel next to the found pixel
     4
     5{{{
     6#include <MsgBoxConstants.au3>
     7AutoItSetOption ( "PixelCoordMode" ,1)
     8AutoItSetOption ( "MouseCoordMode" ,1)
     9
     10; Find a pure red pixel in the range 0,0, 1450,770
     11Local $aCoord = PixelSearch(0, 0, 1450, 770, 0xFF0000)
     12If Not @error Then
     13
     14        $color = PixelGetColor($aCoord[0],$aCoord[1],1)
     15        ConsoleWrite("> X and Y are: " & $aCoord[0] & "," & $aCoord[1] & "  color:" & Hex($color,6) & @CRLF)
     16        MouseMove($aCoord[0],$aCoord[1])
     17        Sleep(500)
     18EndIf
     19Sleep(1000)
     20
     21;Check result with mouse pos
     22Local $aCoordm = MouseGetPos()
     23$colorm = PixelGetColor($aCoordm[0],$aCoordm[1])
     24ConsoleWrite("> X and Y are: " & $aCoordm[0] & "," & $aCoordm[1] & "  color:" & Hex($colorm,6) & @CRLF)
     25
     26$colorm = PixelGetColor($aCoordm[0]-1,$aCoordm[1]-1,1)
     27ConsoleWrite("> X and Y are: " & $aCoordm[0]-1 & "," & $aCoordm[1]-1 & "  color:" & Hex($colorm,6) & @CRLF)
     28
     29}}}