Need help with some code

Get help with using AutoHotkey and its commands and hotkeys
HundsWolf
Posts: 1
Joined: 17 Jun 2019, 01:54

Need help with some code

17 Jun 2019, 02:05

Im currently working on a script, and cant figure out how to do the next step in it.
I want the Script to check a color on X/Y and compare it to a color im telling it. If the colors are the same it should proceed else it should wait for x and then go back to checking the color and comparing it again till they are identical. Since im new to coding I cant figure out how to get the loop with the color check and the if/else statment.
Ty for reading/helping me out!

HundsWolf
Rohwedder
Posts: 2221
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Need help with some code

17 Jun 2019, 07:42

Hallo,
try:

Code: Select all

Loop
{
	PixelGetColor, Color , 100, 200 ;check a color on X/Y
	If Color = x800080 ;compare it to a color im telling it
		Break ;If the colors are the same it should proceed
	Sleep, 100 ;else it should wait for x (milliseconds)
} ;and then go back to checking the color and comparing it again

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], DRocks, Google [Bot], whitestar127 and 75 guests