diff --git a/Autotyper/README.md b/Autotyper/README.md new file mode 100644 index 000000000..59e54fff8 --- /dev/null +++ b/Autotyper/README.md @@ -0,0 +1,22 @@ +# Autotyper Script + +## Short description + +This Python script reads lines from a text file and types them automatically, simulating human-like typing behavior using the `pyautogui` and `time` libraries. + +## Short description of script + +The script achieves automated typing of text from a file to any active window. It waits for a few seconds to allow the user to focus the cursor on the desired input area before typing begins. + +## Setup instructions + +1. Install required libraries: + ```pip install pyautogui + + ``` +2. Place your text file (e.g., text.txt) in the same directory as the script or provide an absolute path in the code. +3. Run the script: + ```python autotyper.py + + ``` +4. Switch to the window where you want the text to be typed. The script will begin typing after a 5-second delay. diff --git a/Autotyper/autotyper.py b/Autotyper/autotyper.py new file mode 100644 index 000000000..3a088902e --- /dev/null +++ b/Autotyper/autotyper.py @@ -0,0 +1,10 @@ +import pyautogui +import time + +# Wait for 5 seconds before starting +time.sleep(5) + +# Paste code from the text file - CV +with open("text.txt", "r", encoding="utf-8") as file: + for line in file: + pyautogui.typewrite(line) diff --git a/Autotyper/text.txt b/Autotyper/text.txt new file mode 100644 index 000000000..fc5950e38 --- /dev/null +++ b/Autotyper/text.txt @@ -0,0 +1,6 @@ +This is demo text you can remove this and can place your own text + +#include +#include +using namespace std; +