gabekole Posted August 7, 2017 Posted August 7, 2017 So I need to automatically click a button that essentially appears at a random time but it is always in the same place. I am trying to do this with pixel search and it works, but it doesn't move on the next function. please help #include <misc.au3> AutoItSetOption("mousecoordmode", 0) AutoItSetOption("CoordMode", 0) AutoItSetOption("GUICoordMode", 0) AutoItSetOption("PixelcoordMode", 0) WinActivate("League of Legends") HotKeySet("m", "Terminate") Func lobby() $accept = Pixelsearch(476, 437, 543, 450, 0x0A3C7C7, 4) if not(@error) Then ConsoleWrite("AcceptButtonFound") MouseClick("left", $accept[0], $accept[1], 1, 10) sleep(100) Assign("$state", "3") Sleep(100) endif EndFunc WinActivate("league of legends") Do sleep(200) call("lobby") sleep(500) Until ConsoleRead() = "acceptbuttonfound" sleep(2000) call("champselect")
water Posted August 7, 2017 Posted August 7, 2017 Welcome to AutoIt and the forum! Seems you missed to read the forum rules on your way in. Please do so now. Game automation of any kind is not allowed here. So you will not get any help on this subject. Hope to see you with a legitimate question soon My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
gabekole Posted August 7, 2017 Author Posted August 7, 2017 I am not automating the game I just don't want to have to accept the game manually
water Posted August 7, 2017 Posted August 7, 2017 Let's see what the Mods have to say My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
iamtheky Posted August 7, 2017 Posted August 7, 2017 (edited) imho: You are automating a control in a window that is owned and presented by the game process. The answer has to be no, or this devolves the "no game rule" into semantics and which functions are available on the screen you are trying to automate. Edited August 7, 2017 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
iamtheky Posted August 7, 2017 Posted August 7, 2017 but I also aint nobody, I just like to debate and am interested in the mods decision. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Recommended Posts