Jump to content

I need help with auto clicking a match accept button in league of legends


Recommended Posts

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

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 - 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 (NEW 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

 

Link to comment
Share on other sites

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 - 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 (NEW 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

 

Link to comment
Share on other sites

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 by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

but I also aint nobody, I just like to debate and am interested in the mods decision.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...