本文来自于Thinkai’s Blog,thinkai也是我在ahk上面的引路人,对thinkai感兴趣的朋友请关注他的博客。
thinkai的博客简洁、有趣,即便是转载过来我也尽量保持作者原有的风格,主要是方便大家查阅。
#Persistent
IfNotExist, hotkey.ini
{
ie := "F8"
folder := "F9"
}
else
{
IniRead, ie, hotkey.ini, key, ie
IniRead, folder, hotkey.ini, key, folder
}
Hotkey, % ie, ie
Hotkey, % folder, folder
Menu, Tray, Add, 设置快捷键, set
return
ie:
Run, iexplore.exe www.baidu.com
return
folder:
Run, explorer.exe /e`,d:\
return
set:
Hotkey, % ie, Off
Hotkey, % folder, Off
Gui, set:Destroy
Gui, set:Add, text, x0 y0 w100 h20, 浏览器
Gui, set:Add, Hotkey, x100 y0 w100 h20 vie
Gui, set:Add, text, x0 y20 w100 h20, 文件夹
Gui, set:Add, Hotkey, x100 y20 w100 h20 vfolder
Gui, set:Add, Button, x0 y40 w200 h20 gsubset, 确定
Gui, set:Show
GuiControl, set:, folder, % folder
GuiControl, set:, ie, % ie
return
subset:
Gui, set:Submit, NoHide
Iniwrite, % ie, hotkey.ini, key, ie
Iniwrite, % folder, hotkey.ini, key, folder
Hotkey, % ie, ie
Hotkey, % folder, folder
Gui, set:Destroy
return
学习了! ✗棒棒的✗
共同进步