Jump to content

I'm Looking for PixelSearch/PixelGetColor mouse move script


Jono
 Share

Recommended Posts

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
Link to comment
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 :)

Link to comment
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.
Link to comment
Share on other sites

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

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

  • 2 months later...

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

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