Sign in to follow this  
Followers 0
Jono

I'm Looking for PixelSearch/PixelGetColor mouse move script

8 posts in this topic

#1 ·  Posted (edited)

I'm Looking for PixelSearch/PixelGetColor mouse move script.

I've searched for ages for this Script, And all the Scripts I find seem not to have any Instruction or Code for Mouse Move to the PixelSearch/PixelGetColor coordinate.

The Script Color I wish the Script to Left click, Has the following Color Code. RGB Color = 0xB0B00D.

The Mouse Positions are between the following. Minimum: X=764 Y=191. Maximum: X=783 Y=443.

If anyone can please help with this Script, I'd be most grateful! Thank you in advance :)

EDIT* Problem Solved! Source Code added for Helpful User Reference! :o

For the source, Visit here: http://www.autoitscript.com/forum/index.php?showtopic=87119

Edited by Jono

Share this post


Link to post
Share on other sites



This will move the mouse to the color once it is found:

Func Search()
    $boolean = 0
    While $boolean = 0
        $Coords = PixelSearch(764, 191, 783, 443, 0xB0B00D, 10)
        Sleep(2000)
        $boolean = IsArray($Coords)
    WEnd
    MouseMove($Coords[0], $Coords[1], 0)
EndFunc

If you want it to be clicked (if its a button or what ever), replace "MouseMove...." with "MouseClick("Left", $Coords[0], $Coords[1], 1, 1)"

Hope this is what you had in mind and were looking for.


...will never learn all there is to know about autoit, no worries...i came to the forums :)

Share this post


Link to post
Share on other sites

This will move the mouse to the color once it is found:

Func Search()
    $boolean = 0
    While $boolean = 0
        $Coords = PixelSearch(764, 191, 783, 443, 0xB0B00D, 10)
        Sleep(2000)
        $boolean = IsArray($Coords)
    WEnd
    MouseMove($Coords[0], $Coords[1], 0)
EndFunc

If you want it to be clicked (if its a button or what ever), replace "MouseMove...." with "MouseClick("Left", $Coords[0], $Coords[1], 1, 1)"

Hope this is what you had in mind and were looking for.

Does help, however, Cannot seem to get the mouse moving, When I add the script, and Run the au3 file, It runs, and Ends, without moving at all.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

press exit for exit the script becose your mouse will stay on the color . :)

HotKeySet("{ESC}", "Terminate")

Func Search()
    While 1
        $Coords = PixelSearch(764, 191, 783, 443, 0xB0B00D, 0)
        If IsArray($Coord1) Then MouseMove($Coord1[0], $Coord1[1],0)
               ;If IsArray($Coord1) Then MouseClick("Left", $Coords[0], $Coords[1], 1, 0) --> this is if you want to left click.
    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc
Edited by Xav

Share this post


Link to post
Share on other sites

Still doesn't seem to move at all :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Still doesn't seem to move at all :)

watch if you have to good color and the good coordinate.

if you doesnt have the good cordinates, you can try it full screen but it can take any other colors... exit=exit

HotKeySet("{ESC}", "Terminate")

Func Search()
    while 1
        $Coords = PixelSearch(0, 0, 1024, 768, 0xB0B00D)
                if @error then
                MsgBox(0, "Huh" , "There's no color")
                EndIf
        If IsArray($Coord1) Then MouseMove($Coord1[0], $Coord1[1],0)
    ;If IsArray($Coord1) Then MouseClick("Left", $Coords[0], $Coords[1], 1, 0) > this is if you want to left click.
     WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc
Edited by Xav

Share this post


Link to post
Share on other sites

how to get scan monster and then put in the some bot ? please tell me. i'm playing game tantra online please tell me

Share this post


Link to post
Share on other sites

I am unsure what game is being played here, but most games are blocked from internal hacking tools... ie moving the mouse, clicking the mouse, sending a message, ect... With this you need to DLL call out and declare your clicking or simply moving. You can however copy the screen and then do the calculation and move then go back into the game, just one of the techniques I know of.


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

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