【发布时间】:2018-05-04 19:09:18
【问题描述】:
我从https://jacksautohotkeyblog.wordpress.com/2015/10/22/how-to-turn-autohotkey-hotstring-autocorrect-pop-up-menus-into-a-function-part-5-beginning-hotstrings/ 网站找到了这个有效的自动热键 (ahk) 代码。
::agin::
TextMenu("again,a gin,aging")
Return
::duh::
TextMenu("what,huh,you're joking")
Return
TextMenu(TextOptions)
{
StringSplit, MenuItems, TextOptions , `,
Loop %MenuItems0%
{
Item := MenuItems%A_Index%
Menu, MyMenu, add, %Item%, MenuAction
}
Menu, MyMenu, Show
Menu, MyMenu, DeleteAll ;Moved from MenuAction:
}
MenuAction:
SendInput %A_ThisMenuItem%{Raw}%A_EndChar%
Return
这是一个带有菜单的热字符串脚本。例如,当我输入 agin 时,我会得到一个带有三个选项 (again,a gin,aging) 的多选项可供选择。现在我想这样写:
agin=again,a gin,aging
duh=what,huh,you're joking
qwe=qwe,qww,ere
因为我有很多热字串。
【问题讨论】:
标签: autohotkey