Jump to content
Sign in to follow this  
CarVelo

Toggle, Pixel search Help (pixelsearch and toggle button)

Recommended Posts

CarVelo

Hey guys i just started on the autoit language today, so be easy on me x)

(ive tried tutorials that were for beginners but I get confused on how things work in autoit)

NEED HELP ON:

-Making a simple window

(with toggle options)

-pixel capturing and saving it in the program

(for multiple different colors)so it searches different assigned colors at the same time(ie; when the hotkey is toggled on, it searches for red, yellow, orange, purple etc.. at the same time.

As you obviously know Im trying to learn how to make a pixel bot, for an educational purpose *cough* lol

I got this script going,idk if this is right or not but tell me if there is a simpler way x)

-----------------------------------------------------------------------------------------------------------

While 1 = 1    $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xB87524);==> first pixel colour  If Not @error Then    MouseClick("left", $coord[0], $coord[1], 1, 1)  EndIf    $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x51301F) ;==> Second Pixel colour    If Not @error Then    MouseClick("left", $coord[0], $coord[1], 1, 1)    EndIf  WEnd

-----------------------------------------------------------------------------------------------------------

or

-----------------------------------------------------------------------------------------------------------

While 1 = 1

$coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xB87524);==> first pixel colour

If Not @error Then

MouseClick("left", $coord[0], $coord[1], 1, 1)

EndIf

$coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x51301F) ;==> Second Pixel colour

If Not @error Then

MouseClick("left", $coord[0], $coord[1], 1, 1)

EndIf

WEnd

-CarVelo x) thanx >_<

Share this post


Link to post
Share on other sites
CarVelo

thanks volly >_< i appreciate it

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  

×