gabekole

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

7 posts in this topic

#1 ·  Posted

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")    

Share this post


Link to post
Share on other sites



#2 ·  Posted

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

I am not automating the game I just don't want to have to accept the game manually 

Share this post


Link to post
Share on other sites

#4 ·  Posted

Let's see what the Mods have to say :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by iamtheky

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

Share this post


Link to post
Share on other sites

#6 ·  Posted

k

Share this post


Link to post
Share on other sites

#7 ·  Posted

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


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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.