I'm trying to set up AutoHotkey http://www.autohotkey.com/ macros for some common tasks, and I want the hotkeys to mimic Visual Studio's "two-step shortcut" behaviour - i.e. pressing Ctrl-K will enable "macro mode"; within macro mode, pressing certain keys will run a macro and then disable 'macro mode', and any other key will just disable macro mode.
Example - when typing a filename, I want to be able to insert today's date by tapping Ctrl-K, then pressing D.
有谁有一个像这样的有状态 AutoHotkey 脚本的好例子吗?
This Autohotkey script, when you press ctrl+k, will wait for you to press a key and if you press d, it will input the current date.
^k::
Input Key, L1
FormatTime, Time, , yyyy-MM-dd
if Key = d
Send %Time%
return
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)