Markuss75 Posted August 26, 2014 Share Posted August 26, 2014 (edited) Hi everyone i am newbie to auotit , started yesterday and i learn a bit of autoit scripting , watched a video . So i need help with my script ! I need a x and y script . I got color bot only but i need one normal click with coordinates . Script : HotKeySet("{ESC}", "Terminate") HotKeySet("!c", "getColor") HotKeySet("!a", "click") Global $color Global $interval $interval = 300 MsgBox(0, "Starting Up", "Starting, use ESCAPE to quit, Alt + C to set color, and Alt + A to click.") Func Terminate() Exit 1 EndFunc Func getColor() $point = MouseGetPos() $color = PixelGetColor($point[0], $point[1]) MsgBox(0, "Color Set", "The color has been set to " & $color) EndFunc Func click() MsgBox(0, "clicking", "Starting to click") While 1 $point = PixelSearch(1363, 745, 1712, 911, $color) if IsArray($point) Then MouseClick("left", $point[0], $point[1],1,0) Sleep($interval) EndIf Sleep(300) WEnd EndFunc While 1 sleep(10) WEnd Edited August 26, 2014 by Markuss75 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 26, 2014 Moderators Share Posted August 26, 2014 Markus75, welcome to the forum. First off, please give your threads meaningful titles - everyone here is in search of help for an AutoIt script. Secondly, can you please explain in detail what you are trying to accomplish? You will find, 99% of the time, that there are much easier ways to script what you're trying to do without having to resort to PixelGetColors or MouseClicks. What will best help us help you is a step by step guide of what you are trying to do, and in what application/window. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Markuss75 Posted August 26, 2014 Author Share Posted August 26, 2014 I am trying to accomplish a fighting bot for a game : Pokemon Moon . I need PixelGotColors because there's a image when you fight and restart text when you complete the fight. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 26, 2014 Moderators Share Posted August 26, 2014 So, here is where I direct you to the forum rules, in the lower right hand corner of every page. You'll see that we do not support game automation here (mainly because cheating at games is lame ). Sorry, but you will not receive any help on this topic. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts