why won't the em-dash itself insert like any other bunch of text?

Get help with using AutoHotkey and its commands and hotkeys
AreaMan
Posts: 2
Joined: 09 Mar 2020, 12:16

why won't the em-dash itself insert like any other bunch of text?

16 Mar 2020, 14:42

<r>I have a bunch of simple hotkeys to insert commonly used text. No easy way to insert an em-dash so I tried AutoHotKey. Got strange results: —<br/>
<br/>
Using the numeric Unicode finally worked.<br/>

<CODEBOX codebox="autohotkey" file="Untitled.ahk"><s>

Code: Select all

</s><i>
</i>^#e::
  ; ;; Control Window e yields an EM DASH: —
SendInput, {U+2014}
Return

^#g::
  ; ;; Control Window g yields — (Crap instead of an EM DASH)
SendInput, —
Return
<e>
</e></CODEBOX>

So why won't the em-dash itself insert like any other bunch of text?<br/>
<br/>
Windows 1909, 64-bit, x86<br/>
AutoHotKey 1.1.32.00</r>

[Mod edit: Provisional topic name added.]
gregster
Posts: 5203
Joined: 30 Sep 2013, 06:48

Re: why won't the em-dash itself insert like any other bunch of text?

16 Mar 2020, 17:28

Please check your file encoding. I just tested: the same happens for me, if I use UTF8 encoding without a BOM.

Please use UTF8 with BOM. See also https://www.autohotkey.com/docs/FAQ.htm#nonascii

Return to “Ask For Help”

Who is online

Users browsing this forum: scriptor2016, songdg and 35 guests