A quick and small python script that helps you autotype on websites that have copy paste disabled like Moodle, HackerEarth contests etc as it is difficult to efficiently debug your code on an online compiler.
Works for windows, mac and linux
python3.9.x
pip
- Create a new virtual environment using
pipenv
pip install pipenv --user
# create venv and install dependencies from Pipfile
pipenv install
- Activate the environment
pipenv shell
# check if activated
pip -V
pip install -r requirements.txt
- For Linux
For Ubuntu or other distros with Apt:
sudo apt-get install python3-tk
For Fedora:
sudo dnf install python3-tkinter
For Arch Based
sudo pacman -S tk
- Run it as CLI app
Provide the path of the file to be autotyped and the delay time through teminal/shell.
python3 command_line_script --path filePath --delay delay_before_typing
- Run the script
python3 GUI_script.py
- You can simply type your code in the textbox , enter the time delay and click the
Start Typing
button.The script will then type your code for you.
- If your code is in a file , then leave the textbox blank , enter the time delay and click
Start Typing
button.A file exploror prompt will open asking you to select the file.Simply select your file and Done! Autotype will type your code for you.
- There are two themes in the GUI Script: Dark and Light. By clicking the toggle in the bottom left corner of the window, you can switch between the two.
Put the text inside code
in Simulator/simulate_keyboard.py
as follows
Line 13
code = """
#include<bits/stdc++.h>
{
.
.
.
}
"""
# Make sure to use triple quotes as it will preserve the code format.
- Run the script
python3 Simulator/simulate_keyboard.py
- The script will start typing after 3s (wait or delay time can be tuned)
- After running the script click on the window to move your cursor wherever you want to auto-type.
Thanks a lot for spending your time helping AutoType grow. Thanks a lot! Keep rocking 🍻
This project needs your shiny star ⭐. Don't forget to leave a star ⭐️