Skip to content

Commit 9f584e1

Browse files
main files added
1 parent bcdccd5 commit 9f584e1

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

Autotyper/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Autotyper Script
2+
3+
## Short description
4+
5+
This Python script reads lines from a text file and types them automatically, simulating human-like typing behavior using the `pyautogui` and `time` libraries.
6+
7+
## Short description of script
8+
9+
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.
10+
11+
## Setup instructions
12+
13+
1. Install required libraries:
14+
```pip install pyautogui
15+
16+
```
17+
2. Place your text file (e.g., text.txt) in the same directory as the script or provide an absolute path in the code.
18+
3. Run the script:
19+
```python autotyper.py
20+
21+
```
22+
4. Switch to the window where you want the text to be typed. The script will begin typing after a 5-second delay.

Autotyper/autotyper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pyautogui
2+
import time
3+
time.sleep(5)
4+
#paste code in the text file-CV
5+
for line in open("text.txt", "r",encoding="utf-8"):
6+
pyautogui.typewrite(line)

Autotyper/text.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This is demo text you can remove this and can place your own text
2+
3+
#include <iostream>
4+
#include <vector>
5+
using namespace std;
6+

0 commit comments

Comments
 (0)