復制代碼
代碼如下:
#z::run notepad
;啟動Visual Studio 2008
#s::
SYSPROGRAMDIR:= “D:/Program Files”
Run %SYSPROGRAMDIR%/Microsoft Visual Studio 9.0/Common7/IDE/devenv.exe
return
;啟動flashfxp
#f::run G:/flashfxp/FlashFXP.exe
;啟動everything搜索文件
!s::run G:/其他軟件/Everything-搜索文件/Everything-1.2.0.323b.exe
;啟動QQ
#q::run G:/Program Files/Tencent/QQ/Bin/QQ.exe
;常用目錄啟動
;啟動G盤常用軟件
#c::run G:/其他軟件
;打開音樂目錄
:*:yy`t::
run H:/MUSIC/
return
其中呢最后一個打開音樂目錄的腳本使用方法我來為大家解釋下,就是在鍵盤上按“yy”然后按“tab”就可以打開目錄了(為什么會寫成這樣而不是像上面一樣使用Win+鍵盤按鈕實現(xiàn)是因為我實在找不到可以使用的鍵盤快捷組合鍵了)
二、音量調(diào)節(jié)
這段代碼我個人認為也是比較有用,雖然現(xiàn)在大多筆記本都有了音量調(diào)節(jié)功能,但是由于這個音量調(diào)節(jié)按鈕可能分布的不合理,所以可能按起來不舒服。
復制代碼
代碼如下:
音量調(diào)節(jié)
;#NoTrayIcon
+#Up::
;SoundSet +3
SoundSet, +3, wave
gosub, vupdt
return
#WheelDown::
#Down::
SoundSet -3
SoundSet, -3, wave
gosub, vupdt
return
#WheelUp::
#Up::
SoundSet +3
SoundSet, +3, wave
gosub, vupdt
return
+#Down::
;SoundSet -3
SoundSet, -3, wave
gosub, vupdt
return
#Left::
SoundSet, -0, Microphone, mute
IfWinExist, volume
{
SoundGet, m_m, Microphone, mute
if m_m = On
GuiControl,, R, 0
else
GuiControl,, R, 1
SetTimer,label, 2000
return
}
Gosub, show
Return
#MButton::
#Right::
SoundSet, -0, MASTER, mute
IfWinExist, volume
{
SoundGet, v_m, master, mute
if v_m = On
GuiControl,, Pic1,*icon40 d:/WINDOWS/system32/mmsys.cpl
else
GuiControl,, Pic1, *icon1 d:/WINDOWS/system32/mmsys.cpl
SetTimer,label, 2000
return
}
Gosub, show
Return
;This routine is isolated to avoid icon flashing
vupdt:
IfWinExist, volume
{
SoundGetWaveVolume, wave_volume
GuiControl,, WP, %wave_volume%
SoundGet, master_volume
GuiControl,, MP, %master_volume%
SetTimer,label, 2000
return
}
Gosub, show
Return
show:
SoundGet, master_volume
SoundGetWaveVolume, wave_volume
SoundGet, m_m, Microphone, mute
SoundGet, v_m, master, mute
IfWinNotExist, volume
{
Gui, +ToolWindow -Caption +0x400000 +alwaysontop
Gui, Add, GroupBox, x3 y2 w40 h45 cblack,
Gui, Add, text, x48 y12 ,Wave
Gui, Add, text, x48 y32 ,Master
Gui, Add, Progress,horizontal vMP x90 y28 w120 h18 c333cc,%master_volume%
Gui, Add, Progress,horizontal vWP x90 y9 w120 h18 c333cc,%wave_volume%
if v_m = On
Gui, Add, pic, x7 y13 vPic1 icon40, d:/WINDOWS/system32/mmsys.cpl
else
Gui, Add, pic, x7 y13 vPic1 icon1, d:/WINDOWS/system32/mmsys.cpl
if m_m = On
GuiControl,, R, 0
else
GuiControl,, R, 1
Gui, Show, NoActivate x720 y460 h48 w213, volume
}
SetTimer,label, 2000
return
label:
SetTimer,label, off
Gui, destroy
以上的代碼僅在XP下測試通過,vista和win7測試過,大家覺得有用就使用吧.
三、心得體會
我現(xiàn)在為大家介紹下我的寫快捷鍵的心得:
1、避免和系統(tǒng)快捷鍵沖突
大家可以看一下系統(tǒng)的默認鍵盤快捷方式基本已經(jīng)有很多了,而我們寫的腳本最好又不能和系統(tǒng)的快捷鍵沖突,系統(tǒng)的常用快捷鍵都是使用Ctrl+XX和Alt+XX來組合的,而Win+XX的很少,所以我們應該盡量使用Win+XX來組合,所以這也是為什么我要使用Win+xx的原因。
2、盡量將快捷鍵放在左手
大家正常使用的情況下都是右手鼠標,左手放在鍵盤上(左撇子就相反啦),所以我們要盡最大可能的使我們在使用的過程中不要讓右手離開鼠標,僅僅靠單手就能解決問題,因為這樣的效率是最高的(個人認為,可以多線程操作了嘛),所以既然要放在左邊了我們就要把快捷鍵限定在鍵盤上的R向下畫一條線就是R,F,V,這樣不至于左手按不過來(如果手很大就令當別論了)
我介紹的僅僅是AutoHotKey的最簡單的功能,我也僅用到這些,在網(wǎng)上還有很多牛人用AutoHotKey寫了很多小工具,都非常的牛B,而且AutoHotKey的功能也不僅僅這些,大家有興趣可以去研究下!
下載地址:AutoHotKey