PixelSearch help

Get help with using AutoHotkey and its commands and hotkeys
Posts: 97
Joined: 07 Apr 2017, 19:43

PixelSearch help

26 Apr 2017, 13:41

What I am trying to do is PixelSearch an orange color, and within the X,Y axis from where my current mouse position is I want it to find a certain color grey within the second PixelSearch coordinates.

Code: Select all

Send, {F3}
Sleep, 150
Send, google{ESC}
Sleep, 100
;first pixel search coords
PixelSearch, Px, Py, 650, 187, 1446, 812, 0x3296FF, 0, Fast
   MouseMove, %Px%, %Py%
Sleep, 100
;2nd pixel search coords
PixelSearch, Px, Py, %Px%, %Py%, 1000, 5, R, 0xE0E0E0, 0, Fast
; Mouse move to the new Px, Py area where the 0xE0E0E0 (grey) color is located.
   MouseMove, %Px%, %Py%
MouseClick, left
;Click that location
User avatar
Posts: 404
Joined: 30 Sep 2014, 10:32

Re: PixelSearch help

26 Apr 2017, 15:14

It looks like a working script, but it will probably work too fast so yoy can't track the mouse pointer with your eyes as it mowes toward orange pixel, and almost imediately goes another direction toward the grey pixel.
Furthermore you don't have considered what should happens if one or both color is not found. The mouse pointer would got in upper left corner of your program window if gray color isn't found.

I beleive PixelSearch would ignore fast mode if x1 > x2 or y1 > y2, so the search may take longer time than you expected.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], moowee, nik2502 and 54 guests