Drew Posted January 6, 2008 Posted January 6, 2008 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
Jex Posted January 6, 2008 Posted January 6, 2008 (edited) That mean your PixelSearch not found coord. $coord = PixelSearch( 199, 224, 289, 345, 0x0C0C28, 10) If @error Then $Error = 1 Else $Error = 0 EndIf Func _HotKey() AutoItSetOption("MouseCoordMode", 0) MouseClick("Left", 245, 364, 1, 0) If $Error = 0 Then MouseMove($coord[0], $coord[1]) EndFunc While 1 Sleep(10) WEnd Func _Exit() Exit EndFunc Try that. Edited January 6, 2008 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer
Drew Posted January 6, 2008 Author Posted January 6, 2008 (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 January 6, 2008 by Drew
Drew Posted January 6, 2008 Author Posted January 6, 2008 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now