I figured out How to QUICKLY remove Em Dashes “—” from ChatGPT
By Holidays in Europe / November 27, 2025 / No Comments / Uncategorized
Efficiently Removing Em Dashes (“—”) from Text Using AutoHotkey
In the realm of digital content creation, consistency and clarity are paramount. Sometimes, when working with generated texts—such as those produced by AI tools like ChatGPT—undesired typographical characters like em dashes (“—”) can disrupt readability or stylistic preferences. Fortunately, there is a quick and effective method to remove em dashes from your text: leveraging the power of AutoHotkey (AHK) scripts. This guide walks you through a streamlined process to automate the removal of em dashes from any selected text on your Windows machine.
What is AutoHotkey?
AutoHotkey is a free, open-source scripting language for Windows that allows users to automate repetitive tasks. It is particularly useful for creating custom shortcuts and scripts to process text, automate mouse and keyboard actions, and much more.
Step-by-Step Guide to Remove Em Dashes Quickly
1. Install AutoHotkey
Begin by downloading and installing AutoHotkey from the official website: https://www.autohotkey.com/. Make sure to install version 1.x for compatibility with the provided script.
2. Create the Removal Script
Open any text editor (such as Notepad) and paste the following script:
“`autohotkey
NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; F2 – remove em dash and collapse surrounding spaces
F2::
Clipboard := “”
Send ^c
ClipWait, 0.3
if ErrorLevel
return
text := Clipboard
; Remove " space — space " and replace with a single space
text := RegExReplace(text, "\s*—\s*", " ")
Clipboard := text
Send ^v
return
“`
Save this file with an .ahk extension, for example, RemoveEmDashes.ahk.
3. Run the Script as Administrator
Right-click on the saved script file and select Run as administrator. Running the script with admin privileges ensures it can access and modify