pixels related

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
frost jack
Posts: 8
Joined: 19 Jun 2016, 07:09

pixels related

14 Aug 2018, 04:03

hey guys , i want some help
how could i search for 2 pixels at the same time i mean like
pixelsearch,foundX,foundY,0,0,a_screenwidth,a_screenheight,(pixel1 and pixel2),,fast
as soon it finds one of the pixels it triggers the rest of the script
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: pixels related

14 Aug 2018, 04:25

Code: Select all

Loop {
	PixelSearch x1, y1, 0, 0, A_ScreenWidth, A_ScreenHeight, 0xFFFFFF, 0, Fast RGB
	PixelSearch x2, y2, 0, 0, A_ScreenWidth, A_ScreenHeight, 0x000000, 0, Fast RGB	
} Until (x1 != "" || x2 != "")

MsgBox % "rest of the script"
e: until (x1 && x2) is wrong actually and will fail for x = 0. better to check against blank, or ErrorLevel but you'll have to assign it to a separate var.
Last edited by swagfag on 15 Aug 2018, 13:06, edited 2 times in total.
frost jack
Posts: 8
Joined: 19 Jun 2016, 07:09

Re: pixels related

14 Aug 2018, 05:59

Thank you :D

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Rohwedder and 346 guests