Sign in to follow this  
Followers 0
Drew

Incredibly Simple Question

4 posts in this topic

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 :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
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?

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