gabekole Posted August 7, 2017 Share 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") Link to comment Share on other sites More sharing options...
water Posted August 7, 2017 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
gabekole Posted August 7, 2017 Author Share Posted August 7, 2017 I am not automating the game I just don't want to have to accept the game manually Link to comment Share on other sites More sharing options...
water Posted August 7, 2017 Share Posted August 7, 2017 Let's see what the Mods have to say My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
iamtheky Posted August 7, 2017 Share 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 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
gabekole Posted August 7, 2017 Author Share Posted August 7, 2017 k Link to comment Share on other sites More sharing options...
iamtheky Posted August 7, 2017 Share Posted August 7, 2017 but I also aint nobody, I just like to debate and am interested in the mods decision. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Recommended Posts