Jump to content

Pixel HELP


Kindbudz
 Share

Recommended Posts

Hello autoit people!! I gotta say I love how straight forward autoit is and how easy it is to learn. With that said I do have a few questions wich I dont feel the HELP file covers very well. On a side note neither does google (search syntax could be wrong and if so help me out!!! :)

What i'm trying to do -

*code

if $pixelcolor = green (a specific pixelcord/pixel color)= hex color/cord green then

call ("blah")

else

continue running *code

end if

I know its vague but you all dont need to see the code to know what i'm talking about... summar below lol :)

I guess a simpler way to put it would be to ask how to check if the pixel is green before said command is ran. If pixel is green then send("{enter}") , if pixel is not green then finish code. I havent been able to find a tutorial or a better explanation of what im looking for. So this might help someone else. And if anyone has a link thats all i need! 8)

I'm also looking for almost the same function with pixelchecksum. I'd imagine theres a way to say ok.. at the beggining of my script im saying that this area here is blue. I call a function which runs, half way through that function it checks to see if that pixel is still blue. if that pixel is anything but blue call a diffrent function. if it is still blue continue with said script.

Any help would be awesome..

Thanks in advance!

Link to comment
Share on other sites

Here part of an old script i have abandon.. If it can help you, i will be happy :)

Look in the Autoit Help File, you will get all your need!

#include <Color.au3>

$pos = MouseGetPos()
$Color = PixelGetColor($pos[0], $pos[1])

$BlueColor = _ColorGetBlue($Color)
$RedColor = _ColorGetRed($Color)
$GreenColor = _ColorGetGreen($Color)

ConsoleWrite("Blue:" & $BlueColor & " Red:" & $RedColor & " Green:" & $GreenColor & @CRLF)
Edited by crash748
Link to comment
Share on other sites

... I love how straight forward autoit is and how easy it is to learn .... but you all dont need to see the code

You're right and here's a few links for you!

#402606

#402227

http://www.autoitscript.com/forum/index.php?showtopic=37289

Maybe you can explain what you don't understand with some example code from the Help file to illustrate where your disconnect is??? Based on your message it doesn't look like you even bothered searching the Help file muchless reading code examples for the Pixel...() functions.

You're off to a great start :).

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...