Help with, "and if not in . . ." proper syntax?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Bildaberg
Posts: 2
Joined: 23 Sep 2018, 14:41

Help with, "and if not in . . ." proper syntax?

23 Sep 2018, 14:45

Code: Select all

square := "0xFFFFFF"
circle := "0x000000"

Pixelgetcolor, RED, 10, 10
Pixelgetcolor, BLUE, 200, 200

if RED in %square% and if BLUE not in %circle% 
ControlSend,, X, Notepad
Could somebody please help me figure out the proper syntax for what I'm trying to achieve here? My code works fine checking the first pixel (that RED is in %square%) but I also need the same line to check that BLUE is not in %circle% before proceeding to send X.

Thanks!
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Help with, "and if not in . . ." proper syntax?

23 Sep 2018, 16:34

Code: Select all

square := "0xFFFFFF"
circle := "0x000000"

Pixelgetcolor, RED, 10, 10
Pixelgetcolor, BLUE, 200, 200

if (RED = square && BLUE != circle)
	ControlSend,, X, Notepad
Bildaberg
Posts: 2
Joined: 23 Sep 2018, 14:41

Re: Help with, "and if not in . . ." proper syntax?

23 Sep 2018, 17:36

I was trying all sorts of combinations of if/and (), etc. I would never have figured out &&!

Thanks, bud!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, doanmvu and 386 guests