Script for en dash, em dash and plain text paste Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Posts: 5
Joined: 26 Apr 2018, 06:58

Script for en dash, em dash and plain text paste

13 Aug 2018, 13:25

This is what I usually run to get all of the above functions, but I think I messed something up because now it won't load. Any help?

Code: Select all

#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.

^+v:: ;paste clipboard as plain text
Clipboard := Clipboard
SendInput, ^v

vText := Clipboard
if RegExMatch(vText, "`r`n$")
	vText := SubStr(vText, 1, -2)

;vText := Clipboard stores the clipboard's plain text to a variable
;Clipboard := vText puts plain text onto the clipboard

^- ; em dash
Send, {ASC 0151}

+- ; en dash
Send, {ASC 0150}
Posts: 47
Joined: 20 Apr 2014, 06:55

Re: Script for en dash, em dash and plain text paste  Topic is solved

14 Aug 2018, 00:38

Code: Select all

^- ; em dash
The double colon after the hotkey's name is missing. The same with the next hotkey.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], cedric3d, Google [Bot], lysanthir, rommmcek, TAC109 and 58 guests