Changes between Version 4 and Version 5 of Ticket #3977, comment 1
- Timestamp:
- 10/20/23 08:42:13 (13 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3977, comment 1
v4 v5 5 5 {{{ 6 6 #include <MsgBoxConstants.au3> 7 AutoItSetOption ( "PixelCoordMode" ,1)8 AutoItSetOption ( "MouseCoordMode" ,1)7 AutoItSetOption("PixelCoordMode", 1) 8 AutoItSetOption("MouseCoordMode", 1) 9 9 10 10 ; Find a pure red pixel in the range 0,0, 1450,770 11 11 Local $aCoord = PixelSearch(0, 0, 1450, 770, 0xFF0000) 12 12 If Not @error Then 13 $color = PixelGetColor($aCoord[0],$aCoord[1],1)14 ConsoleWrite("> X and Y are: " & $aCoord[0] & "," & $aCoord[1] & " color:" & Hex($color, 6) & @CRLF)15 MouseMove($aCoord[0], $aCoord[1])13 Local $color = PixelGetColor($aCoord[0], $aCoord[1], 1) 14 ConsoleWrite("> X and Y are: " & $aCoord[0] & "," & $aCoord[1] & " color:" & Hex($color, 6) & @CRLF) 15 MouseMove($aCoord[0], $aCoord[1]) 16 16 EndIf 17 17 Sleep(1000) … … 19 19 ;Check result with mouse pos 20 20 Local $aCoordm = MouseGetPos() 21 $colorm = PixelGetColor($aCoordm[0],$aCoordm[1])22 ConsoleWrite(">Mouse X and Y are: " & $aCoordm[0] & "," & $aCoordm[1] & " color:" & Hex($colorm, 6) & @CRLF)21 Local $colorm = PixelGetColor($aCoordm[0], $aCoordm[1]) 22 ConsoleWrite(">Mouse X and Y are: " & $aCoordm[0] & "," & $aCoordm[1] & " color:" & Hex($colorm, 6) & @CRLF) 23 23 24 $colorm = PixelGetColor($aCoordm[0]-1,$aCoordm[1]-1,1) 25 ConsoleWrite(">Mouse correction X and Y are: " & $aCoordm[0]-1 & "," & $aCoordm[1]-1 & " color:" & Hex($colorm,6) & @CRLF) 24 Opt("PixelCoordMode", 0) 25 $colorm = PixelGetColor($aCoordm[0] - 1, $aCoordm[1] - 1) 26 ConsoleWrite(">Mouse correction X and Y are: " & $aCoordm[0] - 1 & "," & $aCoordm[1] - 1 & " color:" & Hex($colorm, 6) & @CRLF) 26 27 27 28 }}}