Autohotkey Replace 2 specific character with one

元气小坏坏 提交于 2019-12-02 08:27:33

This works for me:

:::)::
    clipSave := ClipboardAll
    Clipboard := "😊" ;make sure this actually contains the smiley character, once you copied that into your notepad application
    Send, ^v
    Clipboard := clipSave
Return

:::(::
    clipSave := ClipboardAll
    Clipboard := "😢" ;make sure this actually contains the smiley character, once you copied that into your notepad application
    Send, ^v
    Clipboard := clipSave
Return

Make sure to save your file with the correct encoding (UTF-8 did the job for me). You may wanna use something like Notepad++ for that.
It might also help to install the unicode version Autohotkey. (I use the latest 32bit Unicode version of AHK_L.)

What you are looking for is Hotstrings.

Example:

:::)::😊

Basically surrounding your statement with :: followed by what you want to replace it with.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!