Change keypress when pixel is certain color Topic is solved

Ask gaming related questions
Spookyman

Change keypress when pixel is certain color

05 Sep 2018, 10:08

Hi all,

I’m looking to see if there is a possible way to do this
I am looking for a script that looks at a pixel, if it is green, pressing the Z key will instead press X. Don’t need it to press anything automatically, but to just change my input
Rohwedder
Posts: 1507
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Change keypress when pixel is certain color  Topic is solved

13 Sep 2018, 10:08

Hallo,
try:

Code: Select all

CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
While !GetKeyState("LButton")
{
	MouseGetPos, X, Y
	PixelGetColor, Color, X, Y
	ToolTip, The Color at %X%`, %Y% is %Color%.`n Please Click
	Sleep, 100
}
ToolTip
Return

#If PixelGetColor(X, Y) = Color
z::x
#If

PixelGetColor(X,Y)
{
	PixelGetColor, Color, X, Y
	Return, Color
}

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 8 guests