bigassmuffin Posted May 11, 2006 Share Posted May 11, 2006 I have the script: While 1 $var = Pixelgetcolor(28,59) If Hex($var) = 0x637131 then MouseClick("Left", 28, 59, 1) Sleep(5000) Continueloop(1) Endif Wend A few problems, instead of doing: MouseClick("Left", 28, 59, 1) I want it to, (if corect color is found which is above (If Hex($var) = 0x637131 then) then I want the mouse to go to that coordinate... Also, If it finds that color, and the mouse is at the coordiante, I do NOT want it to loop again, instead I want it to play another function... lets just say the other function is Send("F10") Please Help. THANKS SO MUCH! Link to comment Share on other sites More sharing options...
Simucal Posted May 11, 2006 Share Posted May 11, 2006 You should really take some time and look over the wonderful helpfile that autoit comes with. Just typing in "mouse" you would of found the function you wanted: MouseMove As far as it calling a function if it finds that color, what is the problem you are having? While 1 $var = PixelGetColor(28, 59) If Hex($var) = 0x637131 Then MouseMove(28, 59, 0) Sleep(5000) SomeFunction() EndIf WEnd Func SomeFunction() Send("F10") EndFunc ;==>SomeFunction AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
bigassmuffin Posted May 11, 2006 Author Share Posted May 11, 2006 You should really take some time and look over the wonderful helpfile that autoit comes with. Just typing in "mouse" you would of found the function you wanted: MouseMove As far as it calling a function if it finds that color, what is the problem you are having? While 1 $var = PixelGetColor(28, 59) If Hex($var) = 0x637131 Then MouseMove(28, 59, 0) Sleep(5000) SomeFunction() EndIf WEnd Func SomeFunction() Send("F10") EndFunc ;==>SomeFunction Ty, this sewems, right, but I need to add one thing, if it does not find the hex color 0x637131, I want it to loop...but if it finds it, I want it to play "SomeFunction()" Link to comment Share on other sites More sharing options...
Simucal Posted May 11, 2006 Share Posted May 11, 2006 Ty, this sewems, right, but I need to add one thing, if it does not find the hex color 0x637131, I want it to loop...but if it finds it, I want it to play "SomeFunction()"This already does this. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
bigassmuffin Posted May 11, 2006 Author Share Posted May 11, 2006 (edited) I don't know..its not working for me, I keep getting an error message wen i tpye in this function that you supplied for me.. While 1 If (Pixelgetcolor(28,59) == 0x6B7539) Then While 1 $var = PixelGetColor(28, 59) If Hex($var) = 0x6B7539 Then MouseMove(28, 59, 0) Sleep(5000) SomeFunction() EndIf WEnd Func SomeFunction() Send("F10") EndFunc ;==>SomeFunction I get this error: If Hex($var) = 0x6B7539 Then If ^ ERROR Error: Incorrect number of parameters in function call. Edited May 11, 2006 by bigassmuffin Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 11, 2006 Moderators Share Posted May 11, 2006 (edited) I told you earlier today in another post that the call you are doing is incorrect... Look up Hex in the help file, the error shows you that you are missing a parameter. I gave you answer above the If (PixelGetColor(28, 59) == 0x6B7539) ThenWhy are you still insisting on using the failing code too? Just replace:$var = PixelGetColor(28, 59) If Hex($var) = 0x6B7539 ThenWithIf (PixelGetColor(28, 59) == 0x6B7539) ThenEdit: Fixed a code tag (Hint you should use those) Edited May 11, 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...
bigassmuffin Posted May 11, 2006 Author Share Posted May 11, 2006 I told you earlier today in another post that the call you are doing is incorrect... Look up Hex in the help file, the error shows you that you are missing a parameter. I gave you answer above the If (PixelGetColor(28, 59) == 0x6B7539) ThenWhy are you still insisting on using the failing code too? Just replace:$var = PixelGetColor(28, 59) If Hex($var) = 0x6B7539 ThenWithIf (PixelGetColor(28, 59) == 0x6B7539) ThenEdit: Fixed a code tag (Hint you should use those) WORKS GREAT! thank you 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