Warning This is a work in progress. Use at your own risk.
This project is a Python script for performing image recognition and clicking on the best match location. It uses the PyAutoGUI library to simulate mouse clicks and the OpenCV library for image recognition.
Warning This is Usage generated by AI (github copilot chat). May contain bugs and errors.
-
Install the required Python packages by running the following command in your terminal:
pip install -r requirements.txt
-
Create a new folder called
target
in the same directory as themain.py
file. This folder will be used to store the images and text files that the script will operate on. -
Add the images and text files that you want the script to operate on to the
target
folder. -
Open the
main.py
file in your preferred Python editor or IDE. -
Run the
main()
function to execute the script. This will perform the following operations on the files in thetarget
folder:- If the file has a
.png
extension, the script will simulate a mouse click on the image. - If the file has a
.bt
extension, the script will simulate typing the text in the file. - If the file has a
.bp
extension, the script will simulate pressing the key combination in the file. - If the file has a
.bs
extension, the script will simulate pressing the keyboard shortcut in the file.
Note that the file names must follow a specific format in order for the script to recognize them. See the "File naming conventions" section below for more information.
- If the file has a
-
After the script has finished executing, check the output in the terminal to see the results of the operations.
The script expects the files in the target
folder to follow specific naming conventions in order to be recognized. The file names should be in the following format:
- For
.png
files: any name with a.png
extension. - For
.bt
files:[order]_[text].bt
, where[order]
is a number indicating the order in which the file should be processed, and[text]
is the text to be typed. - For
.bp
files:[order]_[key combination].bp
, where[order]
is a number indicating the order in which the file should be processed, and[key combination]
is the key combination to be pressed (e.g.ctrl+c
). - For
.bs
files:[order]_[shortcut].bs
, where[order]
is a number indicating the order in which the file should be processed, and[shortcut]
is the keyboard shortcut to be pressed (e.g.ctrl+alt+delete
).
You can build the script into an executable file using PyInstaller:
pyinstaller --onefile main.py --name clickbot
The executable file will be in the dist
folder.
- click on the target image
- type, press key, and press shortcut
- create a GUI by Eel
- add a feature to record the mouse and keyboard actions
- create a documentation