McGod Posted March 2, 2006 Share Posted March 2, 2006 Ok well im tryin to get it to find a purple rectangle that moves. So i got a bigger Rectangle to look for it. Everytime it gives @error. Script Func Heal () MouseClick ( "left", 770, 432, 1, 5 ) Sleep ( 700 ) MouseClick ( "left", 590, 493, 1, 5 ) Sleep ( 5000 ) $coord = PixelSearch ( 273, 578, 367, 350, 0xA420FC, 30, 2 ) Sleep ( 300 ) MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf EndIf EndFunc [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 2, 2006 Moderators Share Posted March 2, 2006 (edited) Func Heal () MouseClick ( "left", 770, 432, 1, 5 ) Sleep ( 700 ) MouseClick ( "left", 590, 493, 1, 5 ) Sleep ( 5000 ) $coord = PixelSearch ( 273, 578, 367, 350, 0xA420FC, 30, 2 ) If Not @error And IsArray($coord) Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndFunc Edit: Also, you do know that your Y coords are probably backwards? looks like this: 273, 578, 367, 350 should probably be this: 273, 350, 367, 578 ? Edited March 2, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
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