🚀 Passionate part-time software and script developer that are often useless but just haven't been found by the right people.
- 💼 I'm currently working on: 💻 Developing a new overlay app for TeamFightTactics(TFT)
- 💬 Ask me about: 💡 Python/Java/HTML/CSS
- ⚡ Fun fact: 🎢One random day I accidentally debugged Mindustry's main run file.
This Python application automatically finds and clicks the "Accept" button in League of Legends, helping you quickly enter matches. It can be configured to run automatically on system startup across different operating systems.
- Automatically detects and clicks the "Accept" button in League of Legends.
- Configurable to run on startup for Windows, macOS, and Linux.
- Logs activity for troubleshooting and monitoring.
- 1. Ensure that the accept_button.png is located in the same directory as auto-accept.py.
- 2. Be sure to launch "League of Legends" and not move the window around. Take a screenshot of the "Accept" button and crop it. Cut everything else except the button itself.
- 3. Do NOT change the resolution of your screen too much. The script will detect the button only from the screenshot taken. If you want this to work in another resolution, make sure to take another screenshot, and replace the accept_button.png with the new screenshot.
- 4. Python should be installed in your system for the script to run in the first place.
Open your prefered terminal and run auto-accept.py
.
- Windows
python auto-accept.py
- MacOS
python3 auto-accept.py
- Linux
python3 auto-accept.py
A simple guide to install Python on Windows, macOS, and Linux (Ubuntu/Mint).
- Visit the official Python website.
- Click on "Download Python [version]" (e.g., Python 3.12.x).
- Open the downloaded
.exe
file. - Important: Check the box "Add Python to PATH".
- Click "Install Now" (or choose "Customize installation" for advanced options).
Open Command Prompt and run:
python --version
Expected output:
Python 3.12.x
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python
python3 --version
Expected output:
Python 3.12.x
echo 'alias python=python3' >> ~/.zshrc
source ~/.zshrc
sudo apt update && sudo apt upgrade
sudo apt install python3 python3-pip -y
python3 --version
Expected output:
Python 3.12.x
echo "alias python=python3" >> ~/.bashrc
echo "alias pip=pip3" >> ~/.bashrc
source ~/.bashrc
- Install packages using pip:
pip install <package-name>
- Check pip version:
pip --version
- Use Virtual Environments (Recommended):
python -m venv myenv
source myenv/bin/activate # macOS/Linux
myenv\\Scripts\\activate # Windows
Pro Tip: Use a virtual environment for every project to avoid dependency conflicts.
- Python Documentation
- pip User Guide
- Visual Studio Code – a great code editor for Python
To convert the Python script into an executable:
pip install pyinstaller
pyinstaller --onefile accept-button.py
This will generate an executable in the dist directory. Set Up on Startup
Press Win + R, type shell:startup, and press Enter to open the Startup folder. Copy the executable file from the dist directory into the Startup folder.
Convert Python Script to Executable
To create a macOS application:
pip install py2app
python accept-button py2app
This creates an .app package. Add to Login Items
Open System Preferences -> Users & Groups. Select your user account and click on the Login Items tab. Drag the .app file into the Login Items list.
Create a Systemd Service
Create a .service file:
sudo nano /etc/systemd/system/auto_accept.service
Add the following content:
ini
[Unit]
Description=Auto Accept League of Legends
[Service]
ExecStart=/usr/bin/python3 /path/to/accept-button.py
WorkingDirectory=/path/to/your/script/
Restart=always
User=your_username
[Install]
WantedBy=multi-user.target
Replace /path/to/accept-button.py with the actual path to your script, and your_username with your Linux username
Enable and Start the Service Enable the service to run on boot:
sudo systemctl enable auto_accept.service
Start the service immediately:
sudo systemctl start auto_accept.service
Once set up, the application will automatically run in the background. It will monitor your screen for the "Accept" button in League of Legends and click it when found.
The application generates logs to help troubleshoot any issues. Check the app.log file in the application directory to see the log entries.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
Ensure the accept_button.png image is correctly placed in the same directory as the executable. Adjust the template matching threshold and screen resolution if the button is not being detected correctly.