jackiemagpie Posted June 27, 2020 Posted June 27, 2020 Hi I am new and trying to writing macro but I have one problem. My function must: ""When the colour appears in coordinates, then press "a" """ but I cant find where I need to put the send("a") command . When I put in the While.....Wend it doesnt wait the colour to press "a". When I put the out of the While...Wend line then it doesnt press the "a". Anyone knows the where I need to put ? Local $WaitPixelColor = 0xF8F4F8, $waitpixel While 1 $waitpixel=PixelSearch (340,75,1148,440, $WaitPixelColor) If Not @error Then ExitLoop WEnd
Developers Jos Posted June 27, 2020 Developers Posted June 27, 2020 (edited) On 6/27/2020 at 11:40 AM, jackiemagpie said: I cant find where I need to put the send("a") command Expand What do you think when considering your requested logic? On 6/27/2020 at 11:40 AM, jackiemagpie said: When I put the out of the While...Wend line then it doesnt press the "a". Anyone knows the where I need to put ? Expand That means it that pixels never gotten that color as yet in the indicated area. So what is the goal really for this script? Jos Edited June 27, 2020 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jackiemagpie Posted June 27, 2020 Author Posted June 27, 2020 On 6/27/2020 at 11:44 AM, Jos said: What do you think when considering your requested logic? That means it that pixel never gotten that color as yet. So what is the goal really for this script? Jos Expand I said the goal: When colour appears in coordinates, press a. Simple right ? Also pixel got the colour but dont press a, it finishes the script.
Developers Jos Posted June 27, 2020 Developers Posted June 27, 2020 On 6/27/2020 at 11:50 AM, jackiemagpie said: I said the goal: When colour appears in coordinates, press a. Simple right ? Expand sweet .... have fun. FrancescoDiMuro 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Bert Posted June 27, 2020 Posted June 27, 2020 On 6/27/2020 at 11:50 AM, jackiemagpie said: I said the goal: When colour appears in coordinates, press a. Simple right ? Also pixel got the colour but dont press a, it finishes the script. Expand Lets rephrase what Jos asked - in what application are you using this logic? (the name of the app please) I ask for there may be a MUCH better way to do it. Pixel searching is the worst way to automate. Usually hooking directly into the control is best. The Vollatran project My blog: http://www.vollysinterestingshit.com/
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