Do you need to simulate typing at a higher WPM than what you normally type?
Are you a Windows user?
Then good news! You can do it with a simple Python script, even if you’ve never touched Python before.
This guide walks you through the entire process in plain English.
1. Install Python (If You Haven’t Already)
You need Python installed on your computer.
If you’re on Windows and clicking “python” keeps sending you to the Microsoft Store, don’t worry, follow my step-by-step fix here (link to your other post).
Once Python is installed correctly, we can start.
2. Open the Command Prompt
On Windows:
- Click the search bar
- Type cmd
- Press Enter
A black window will open. That’s the Command Prompt. We’ll use it to install one tool and run your script.
3. Install PyAutoGUI
PyAutoGUI is the library that lets Python “type” for you.
In the Command Prompt, type:
pip install pyautogui
Press Enter and let it finish.
4. Understand and Adjust the Typing Speed FIRST (Important!)
The script types one character at a time, with a small delay between each keystroke.
That delay is controlled by this part of the script:
interval=0.184
This number means:
“Wait 0.184 seconds between each letter.”
If you want the typing to go faster or slower, you must change this number before running the script.
Here’s how the speed works:
How the math breaks down (simple version)
- Smaller interval → faster typing
- Larger interval → slower typing
Approximate intervals and speeds
| Interval | Approx WPM |
|---|---|
| 0.250 | ~48 WPM |
| 0.200 | ~60 WPM |
| 0.184 | ~65 WPM |
| 0.150 | ~80 WPM |
Pick the speed you want now.
Change the number in the script before running it.
5. Prepare Your Text
Before touching the script, decide what text you want automatically typed.
Find it now. You’ll paste it into the script in the next step.
6. The Script (Beginner Version)
Here’s the full script with comments explaining what each line does.
Using a text editor (like Notepad), follow these steps:
1. Open Notepad
- Press the Windows key
- Type Notepad
- Press Enter
2. Copy and paste the script below into Notepad.
3. Find the line that says:
text = ""
and paste your text between the quotes.
4. Adjust the ‘interval=' number to the typing speed you want (see the WPM chart above).
5. Save the file:
- Click File → Save As
- Name the file autotype.py
- Change “Save as type” to All Files (*)
- Save it somewhere easy to find (like Desktop)
6. Once saved, you can run the script from Command Prompt by typing:
python autotype.py
Script to Paste into Notepad
import pyautoguiimport time# This gives you 5 seconds to click into the box where typing should happentime.sleep(5)# Insert the text between the quotes with the text you want typedtext = ""# This controls the typing speed — adjust BEFORE running the scriptpyautogui.write(text, interval=0.184)
7. How to Run the Script
Once you have edited the script to include your text, you can run it two ways:
Option A: Paste directly into Command Prompt
- Copy the entire script
- Right-click inside Command Prompt to paste
- Press Enter
- Quickly click the box where you want the typing to happen (you have 5 seconds)
Option B: Save it as a .py file
- Open Notepad
- Paste the script
- Save as
autotype.py - Run it with:
python autotype.py
8. That’s It!
Once it starts running, the script will type your text automatically at the speed you selected.