ghostofdeath Posted July 28, 2005 Share Posted July 28, 2005 look i have a code here that i need 2 click once everytime that a color apeer : heres the code HotKeySet("{esc}","esc") WinWaitActive("Tibia") Func esc() Exit EndFunc While 1 $1=PixelGetColor(992,416) If $1=49152 Then MouseClick("left",874,415,1) Else If $1= 4737096 Then Sleep(300) EndIf EndIf WEnd Link to comment Share on other sites More sharing options...
Josbe Posted July 28, 2005 Share Posted July 28, 2005 Sorry but, you already tried this?MouseClick ( "button" [, x, y [, clicks [, speed ]]] ) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
ghostofdeath Posted July 28, 2005 Author Share Posted July 28, 2005 lol yes havent u seen the code? MouseClick("left",874,415,1) the '1' there mean clicks Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 28, 2005 Moderators Share Posted July 28, 2005 (edited) lol yes havent u seen the code? MouseClick("left",874,415,1)the '1' there mean clicks <{POST_SNAPBACK}>Won't get very far if you don't try to explain what errors your getting.Try this:Opt("PixelCoordMode", 0); assuming your x and y coords are from an active window if not change 0 to 2 Opt("MouseCoordMode", 0); assuming your x and y coords are from an active window if not change 0 to 2 HotKeySet("{esc}","esc") WinWaitActive("Tibia") Func esc() Exit EndFunc While WinExists("Tibia") WinWait("Tibia") If Not WinActive("Tibia") Then WinActivate("Tibia") Sleep(200) $var = PixelGetColor(992,416) ToolTip("Var Colour == 0x" & Hex($var, 6), 0, 0) If $var == 0x49152 Then; is your colour a hex or a dec? I put 0x assuming that it is a hex. MouseClick("left", 874, 415, 1, 1) Else If $var == 0x4737096 Then Sleep(300) EndIf EndIf WEndEdit: Please let us know what specifically your getting if this doesn't work... Good Luck! Edited July 28, 2005 by ronsrules 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