Sign in to follow this  
Followers 0
Zompy

pixels

21 posts in this topic

Hey, i've been testing the search pixel function etc, but i can't find out if you find a pixel how to click it, how to do that?

Thanks alot

Share this post


Link to post
Share on other sites



Hey, i've been testing the search pixel function etc, but i can't find out if you find a pixel how to click it, how to do that?

Thanks alot

PixelSearch returns the x and y coords of the color found in an Array (if found at all, be sure to check @error). You then use MouseClick with those x and y coords.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

This doesn't work, how should it be

$coord = PixelSearch( 0, 0, 0, 0, 0XB28599, 2, 2 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf
MouseClick("left", $coord)

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Need more hints :) it doesn't work

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$coord = PixelSearch(0, 0, 0, 0, 0xB28599, 2, 2); should be a rectangle, this is zero pixels so maybe try with 0, 0, 1, 1
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]); useless, we already knew this...
    MouseClick("left", $coord[0], $coord[1]); if it's outside the IF and $coord = false we will get a error because $coord[X] doesn't exist
EndIf

Edited by Pain

Share this post


Link to post
Share on other sites

This was the whole code, im going to swin now, ill test it out soon, thanks alot :)

Share this post


Link to post
Share on other sites

Oh it works, i love you :):lmao:

Share this post


Link to post
Share on other sites

Im trying to let my mouse click the ball, but it doesn't work

Curveball

Sleep(5000)
$coord = PixelSearch(275, 580, 750, 275, 0xC8FF, 2, 2); should be a rectangle, this is zero pixels so maybe try with 0, 0, 1, 1
If Not @error Then
;   MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]); useless, we already knew this...
    Mousemove($coord[0], $coord[1]); if it's outside the IF and $coord = false we will get a error because $coord[X] doesn't exist
EndIf

Share this post


Link to post
Share on other sites

Still doesnt work, did you check the game?

Share this post


Link to post
Share on other sites

Still doesnt work, did you check the game?

Share this post


Link to post
Share on other sites

No I didn't. I have no intention of writing it for you. Also please don't bump your threads more than once every 24 hours.

Try some debugging. Use mouse move to move your mouse to each corner of the rectangle. That will give you a visual example of where the rectangle is. Debug. Get AutoIt to tell you the return value/@error/@extended- debug it in other words.

Cheers,

Brett

Share this post


Link to post
Share on other sites

Im sorry, but it just doesnt move at all :)

Share this post


Link to post
Share on other sites

$coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xB28599, 2, 2); changed to search entire screen instead of only 4 pixels
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]); useless, we already knew this...
    MouseClick("left", $coord[0], $coord[1]); if it's outside the IF and $coord = false we will get a error because $coord[X] doesn't exist
EndIf


There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites

$coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xB28599, 2, 2); changed to search entire screen instead of only 4 pixels
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]); useless, we already knew this...
    MouseClick("left", $coord[0], $coord[1]); if it's outside the IF and $coord = false we will get a error because $coord[X] doesn't exist
EndIf

Does that work at your place? Here that doesnt work either

Share this post


Link to post
Share on other sites

Thanks, but it says error while opening FF.au3

and gamebot builder isnt really pro is it, i want to learn it, not to use a bot...

Share this post


Link to post
Share on other sites

Still need help, :)

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