Jump to content

"If pixelgetcolor" not working?


Recommended Posts

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?

Link to comment
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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...