Re: [請益] 如何用autohotkey設定西歐特殊字元?
※ 引述《tokugawa (R.I.P. Lidle)》之銘言:
: 這軟體沒有支援Unicode,寫法如下,快速鍵請自行指定。
: Send {Asc 0228}
: Send {Asc 0246}
: Send {Asc 0252}
: 例如指定Alt+a為U+00E4
: !a::
: Send {Asc 0228}
: return
感謝前面推文的板友,經測試可用。
在AutoHotkey.ahk的開頭加上這段代碼。
DllCall("LoadLibrary", Str,"ntdll.dll")
VarSetCapacity( SendUbuf, 56, 0 )
DllCall("RtlFillMemory", UInt,&SendUbuf, UInt,1, UInt,1)
DllCall("RtlFillMemory", UInt,&SendUbuf+28, UInt,1, UInt,1)
SendU(UC){
Global
DllCall("ntdll.dll\RtlFillMemoryUlong",UInt,
&SendUbuf+6,UInt,4,UInt,0x40000|UC)
DllCall("ntdll.dll\RtlFillMemoryUlong",UInt,
&SendUbuf+34,UInt,4,UInt,0x60000|UC)
Return DllCall("SendInput", UInt,2, UInt,&SendUbuf, Int,28)
}
接下來用SendU()輸出unicode字元
比如說用Ctrl+t輸出「禮」這個字,字元對應表中的代碼是U-79AE
^t::
SendU(0x79AE)
return
這樣就不用像我以前一樣經由剪貼簿輸出unicode字元了。
修改原因:
1.貼上代碼的時候沒注意,造成斷行。
2.只用Alt+任意鍵作為快速鍵好像不行,不知道為什麼。
※ 編輯: tokugawa 來自: 218.169.94.6 (01/06 23:45)
推
01/07 00:19, , 1F
01/07 00:19, 1F
→
01/07 00:19, , 2F
01/07 00:19, 2F
→
01/07 00:44, , 3F
01/07 00:44, 3F
→
01/07 01:30, , 4F
01/07 01:30, 4F
討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):
EZsoft 近期熱門文章
PTT數位生活區 即時熱門文章