Sign in to follow this  
Followers 0
Ham123

"If pixelgetcolor" not working?

3 posts in this topic

I checked the pixel and its color by using autoit.

Then in a func i have:

CODE

func start()

If pixelgetcolor( 200, 500) = 0x000000 Then

Run( "start.exe" )

EndIf

EndFunc

For some reason it does not check the pixel? Am i doing something wrong?

Share this post


Link to post
Share on other sites



I checked the pixel and its color by using autoit.

Then in a func i have:

CODE

func start()

If pixelgetcolor( 200, 500) = 0x000000 Then

Run( "start.exe" )

EndIf

EndFunc

For some reason it does not check the pixel? Am i doing something wrong?

PixelGetColor() returns the value in decimal, not hex. Also, it's good practice to capitalize all of your code appropriately.

Share this post


Link to post
Share on other sites

@ham

Works for me

start()

func start()
    If PixelGetColor(200, 500) = 0x000000 Then 
        ConsoleWrite("Color found" & @CRLF)
    Else
        ConsoleWrite("Color not found" & @CRLF)
    EndIf
EndFunc

@aggixx

You are right on that, but it will still work, try it yourself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0