autohotkey

为了减少敲击键盘的次数,我找到了AutoHotkey,并为此写了个简单扩展的小脚本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#f1::
inputBox, strInput
if (errorLevel != 0) {
return
}

arrInput := strSplit(strInput, ":", "", 2)
action := {"ex": "expandString"}
functionName := action[arrInput[1]]
if isFunc(functionName) {
%functionName%(arrInput[2])
}
return

expandString(short)
{
stringDirectory := {"re": "php d:/WWW/Helper/company/Rename_Local_Site_Image.php ./index_local.html"
, "cis": "http://img.029meishu.com"}
if (stringDirectory[short]) {
waitingToSendInput := stringDirectory[short]
sendInput, %waitingToSendInput%
}
}

脚本效果时,运行时,按Win+F1键,会弹出一个输入框,在输入框里输入ex:re然后确定,脚本会自动帮我把re对应的那一串文字:php d:/WWW/Helper/company/Rename_Local_Site_Image.php ./index_local.html输出到之前光标所在的地方。