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

Get help with using AutoHotkey and its commands and hotkeys
kissinger
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.
!-::–
return


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

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

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

^- ; em dash
!NumpadAdd::
Send, {ASC 0151}
return

+- ; en dash
!NumpadSub::
Send, {ASC 0150}
return
YMP2
Posts: 45
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.
kissinger
Posts: 5
Joined: 26 Apr 2018, 06:58

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

16 Aug 2018, 06:45

Thanks. That did it.

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, chngrcn, Google [Bot], roysubs and 49 guests