如何在AutoHotKey中使用Unicode? [英] How do I use Unicode in AutoHotKey?
问题描述
我试图使两个连字符触发一个短破折号,三个连字符触发一个长破折号;喜欢
I am trying to make two hyphens trigger a short dash, and three hyphens trigger a long dash; like
:*?:---=::—
:*?:--=::–
除了工作.这是我要去的地方:
except working. Here is where I have gotten to:
:*?:11::
SendLevel 1
Send 2
return
SendLevel 0
:*?:21::3
这有效(11个产生2个,111个产生3个)
this works (11 produces 2, 111 produces 3)
:*?:--::
SendLevel 1
Send –
return
SendLevel 0
:*?:–-::—
这是相同的脚本,但是应该产生'1'替换为'-','2'替换为'–',并且'3'替换为'-'--" "–"和"---"应生成-",但不起作用,因为我使用的版本(来自autohotkey.com的AutoHotKey_L v1.1.09.04)不完全支持Unicode.
This is the same script, but ‘1’ has been replaced by ‘-’, ‘2’ has been replaced by ‘–’, and ‘3’ has been replaced by ‘—’—"--" should produce "–" and "---" should produce "—", but it doesn't work because Unicode is not fully supported in the version I am using (AutoHotKey_L v1.1.09.04 from autohotkey.com).
推荐答案
.ahk文本文件需要使用 UTF8-BOM 编码而不是UTF8
The .ahk text file needed to be saved with UTF8-BOM encoding rather than UTF8
此评论中指出,发布以获取更多可见性的答案.
As pointed out in this comment, posting as an answer for more visibility.
这篇关于如何在AutoHotKey中使用Unicode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!