DonTutti Posted December 11, 2018 Posted December 11, 2018 Hello, I have problem with script. My script click on point 1, wait 5 sec and click on point 2 etc. I want to search for point 1, when point 1 is visible click on them wait for reach and search for point 2, click on them, wait for reach etc. Is there any option to check if point is reached then go next? expandcollapse popup#include <Array.au3> HotKeySet("{HOME}", "START") HotKeySet("{END}", "_EXIT") While 1 Sleep(250) WEnd Func Start() $Point1 = 0x44CE57 $Point2 = 0x0F0FFF $Point3 = 0xF50000 While 1 $mark1 = PixelSearch(1199, 135, 1304, 27, $Point1) $reach1 = PixelSearch(1248, 80, 1254, 86, $Point1) If IsArray($mark1) = 1 And IsArray($reach1) = 0 Then MouseMove($mark1[0], $mark1[1], 0) MouseClick("primary") Sleep(5000) EndIf $mark2 = PixelSearch(1199, 135, 1304, 27, $Point2) $reach2 = PixelSearch(1248, 80, 1254, 86, $Point2) If IsArray($mark2) = 1 And IsArray($reach2) = 0 Then MouseMove($mark2[0], $mark2[1], 0) MouseClick("primary") Sleep(5000) EndIf $mark3 = PixelSearch(1199, 135, 1304, 27, $Point3) $reach3 = PixelSearch(1248, 80, 1254, 86, $Point3) If IsArray($mark3) = 1 And IsArray($reach3) = 0 Then MouseMove($mark3[0], $mark3[1], 0) MouseClick("primary") Sleep(5000) EndIf WEnd EndFunc Func _EXIT() Exit EndFunc
FrancescoDiMuro Posted December 11, 2018 Posted December 11, 2018 @DonTutti Which application are you trying to automate? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Nine Posted December 11, 2018 Posted December 11, 2018 7 minutes ago, DonTutti said: Is there any option to check if point is reached then go next? How do YOU know if point is reached ? ps. if this is game related, you better check forum rules, up there in the stickies, before continuing on this topic. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
DonTutti Posted December 11, 2018 Author Posted December 11, 2018 No no no, its not any automatization. When point is reached it is in central coordination $reach1 = PixelSearch(1248, 80, 1254, 86, $Point1)
FrancescoDiMuro Posted December 11, 2018 Posted December 11, 2018 @DonTutti You are not replying to my question Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
DonTutti Posted December 11, 2018 Author Posted December 11, 2018 I dont want automate any application. I want to use it in browser map
DonTutti Posted December 11, 2018 Author Posted December 11, 2018 Ehh if You think I'm doing some thing to game then ok I have only one question and You can close thread. When I use something like this: If $point = 3 Then $mark3 = PixelSearch(1199, 135, 1304, 27, $Point3) If IsArray($mark3) = 1 Then $reach3 = PixelSearch(1248, 80, 1254, 86, $Point3) If IsArray($reach3) = 0 Then MouseMove($mark3[0], $mark3[1], 0) MouseClick("primary") Sleep(250) EndIf Else $point = 1 ExitLoop EndIf Can I go back to line where $point = 1? I thought ExitLoop will work but it isnt ;/
Developers Jos Posted December 11, 2018 Developers Posted December 11, 2018 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 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.
Developers Jos Posted December 11, 2018 Developers Posted December 11, 2018 1 hour ago, DonTutti said: Ehh if You think I'm doing some thing to game then ok Don't think this is funny... read those forum rules now and stick to them please. 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.
Recommended Posts