Jump to content

Incredibly Simple Question


Drew
 Share

Recommended Posts

Heres my Code:

HotKeySet('{esc}', '_Exit')
HotKeySet('`', '_HotKey')

$coord = PixelSearch( 199, 224, 289, 345, 0x0C0C28, 10)

Func _HotKey()
    AutoItSetOption( "MouseCoordMode", 0)
    MouseClick( "left", 245, 364, 1, 0)
    If $coord = 1 Then
        MouseMove($coord[0], $coord[1])
        EndIf
    
EndFunc

While 1
    Sleep(10)
WEnd

Func _Exit()
    Exit
EndFunc

Heres my Error:

MouseMove($coord[0], $coord[1])

MouseMove($coord^ ERROR

>Exit code: 1 Time: 9.876

I don't understand what I did wrong. Please help :)

Link to comment
Share on other sites

Link to comment
Share on other sites

No error, but it doesn't move to the $coord[0], $coord[1] either. Does the Mouseclick and click , and nothing else.

EDIT

Sorry. I added the line:

If $Error = 1 Then MsgBox( 0, "Error", "You ****** up adding the color.")

So obviously I added the wrong color. Thanks a ton, got rid of my error :)

Edited by Drew
Link to comment
Share on other sites

Alright new problem. I set the shades, to 10. couldn't find so I raised it. nothing. got upset and set shades to 50. Theres no other color close to this color. Its dark blue against black. in the rectangle i set for the pixelsearch. What could possibly be throwing it off?

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