vipppy Posted August 24, 2020 Share Posted August 24, 2020 Hi I'm trying to write a script for a game what i tried to do is, to use the pixel search function to find the coordinate of the colour and then to Left click the mouse on the target. but I'm getting and error line 10 Local $aCoord = PixelSearch(0, 0, 1920, 1080, #95340c) Local $aCoord = PixelSearch(0, 0, 1920, 1080, ^ ERROR Error: unable to parse line Func Goon() WinActivate("Goon", "") WinMove("Goon", "", 0, 0) sleep(1000) EndFunc Func clean_interface() ; Find a pure red pixel in the range 0,0, 1920, 1080 Local $aCoord = PixelSearch(0, 0, 1920, 1080, #95340c) If Not @error Then MouseClick("Left" [,clicks = 1) sleep(500) EndIf EndFunc Goon() clean_interface() PS i also think this will not work as the mouse will not move to the coordinate in stead it will click left mouse wherever the mouse is located so should i use the mouse move function as well right? Thanks for reviewing my code Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 24, 2020 Moderators Share Posted August 24, 2020 (edited) Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team Edited August 24, 2020 by JLogan3o13 "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