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

Get help with using AutoHotkey (v1.1 and older) 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: 48
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 (v1)”

Who is online

Users browsing this forum: Joey5 and 209 guests