高效工具:AutoHotKey

ahk是熱鍵腳本文件擴展名的一種,編寫ahk文件使用的腳本語言是autohotkey。autohotkey通過把常用的鍵盤鼠標操作編寫成腳本語句來動態(tài)調用的方式避免了每次手動輸入的重復操作,提高了使用計算機的工作效率。


;Author:?

;date: 2015-11-20 10:08:56

#NoEnv? ; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input? ; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir%? ; Ensures a consistent starting directory.

SetTitleMatchMode 2

Activate(t)

{

IfWinActive,%t%

{

WinMinimize

return

}

SetTitleMatchMode 2

DetectHiddenWindows,on

IfWinExist,%t%

{

WinShow

WinActivate

return 1

}

return 0

}

ActivateAndOpen(t,p)

{

if Activate(t)==0

{

Run %p%

WinActivate

return

}

}

; win+o啟動outlook郵箱

#o::ActivateAndOpen("Microsoft Outlook","outlook.exe")

#1::Activate("Microsoft Outlook")

#f::ActivateAndOpen("Foxit Reader","C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe")

#2::Activate("Foxit Reader")

#c::ActivateAndOpen("Google Chrome","C:\Program Files\Google\Chrome\Application\chrome.exe")

#3::Activate("Google Chrome")

#s::ActivateAndOpen("Xshell","D:\software-installpackage\xshell_xftp\Xshell_4.0.0128_Xftp_4.0.0110_PortableSoft\XshellXftpPortable\XshellPortable.exe")

#4::Activate("Xshell")

#w::ActivateAndOpen("notes","C:\Program Files\Notes\notes.exe")

#5::Activate("notes")

; win+p 啟動記事本

#p::ActivateAndOpen("Notepad++","Notepad++.exe")

#6::Activate("Notepad++")

#q::ActivateAndOpen("nyfedit","D:\software-installpackage\myBase_Desktop_6.20\nyfedit.exe")

#7::Activate("nyfedit")

;win+j 啟動金山詞霸

#j::ActivateAndOpen("XDict","C:\Program Files\Kingsoft\PowerWord_cut\XDict.exe")

#8::Activate("XDict")

#x::ActivateAndOpen("XMind","D:\software\XMind\XMind.exe")

#9::Activate("XMind")

;#e::ActivateAndOpen("eclipse.exe","D:\eclipse\eclipse.exe")

;#-::Activate("eclipse.exe")

; win+g 啟動google瀏覽器

;#g::Run "C:\Program Files\Google\Chrome\Application\chrome.exe"

;#b::Run www.baidu.com

;#g::Run www.google.com.hk

;win+方向鍵左箭頭;;表示窗口向左放置

;win+方向鍵右箭頭;;表示窗口向右放置

;win+方向鍵上箭頭;;表示窗口最大化

;win+方向鍵下箭頭;;表示窗口窗口化;再次win+方向下箭頭;;表示窗口最小化

WinStatus:=0

;ctrl+m 最大化、窗口化當前窗口

;^m::

;

;if WinStatus=0

;

;{

;

;? ? WinMaximize , A

;

;? ? WinStatus:=1

;

;}

;

;else

;

;{

;

;? ? WinRestore ,A

;

;? ? WinStatus:=0

;

;}

;

;return

;輸入/dd

;然后摁enter 表示輸入時間

::/dd::

d = %A_YYYY%-%A_MM%-%A_DD% %A_Hour%:%A_Min%:%A_Sec%

clipboard = %d%

Send ^v

return

::/ss::

d = %A_YYYY%-%A_MM%-%A_DD% %A_DDDD%

clipboard = %d%

Send ^v

return

::/zqh::鄭泉海

;win +鼠標中鍵 關閉窗口

#MButton::

SendInput !{F4}

Return

; 選取文本后按〔win+G〕執(zhí)行 Google 搜尋

#g::

current_clipboard = %Clipboard% ; 把目前的剪貼板內容存起來供后面還原

Clipboard = ; 先把剪貼板清空

Send ^c

; 把選取字串用〔Ctrl+C〕存入剪貼板

ClipWait, 1 ; 等待 1 秒讓剪貼板執(zhí)行存入動作

; 下行使用 Google 執(zhí)行搜尋動作,要搜尋的字串就是剪貼板內容

Run http://www.google.com.hk/search?hl=zh-TW&q=%Clipboard%

Clipboard = %current_clipboard% ; 還原先前的剪貼板內容

return

; 選取文本后按〔Win+b〕執(zhí)行 baidu 搜尋

#b::

current_clipboard = %Clipboard% ; 把目前的剪貼板內容存起來供后面還原

Clipboard = ; 先把剪貼板清空

Send ^c

; 把選取字串用〔Ctrl+C〕存入剪貼板

ClipWait, 1 ; 等待 1 秒讓剪貼板執(zhí)行存入動作

; 下行使用 Google 執(zhí)行搜尋動作,要搜尋的字串就是剪貼板內容

Run https://www.baidu.com/s?ie=utf-8&f=3&rsv_bp=0&rsv_idx=1&tn=baidu&wd=%Clipboard%

Clipboard = %current_clipboard% ; 還原先前的剪貼板內容

return

;#1::

;run, http://mail.163.com

;WinWaitActive, 網(wǎng)易 ;;等待網(wǎng)頁加載成功(至少title顯示出來)

;sleep, 1000 ;;保險起見,再等1秒(視網(wǎng)速而定)

;send, user-id{tab}password{enter};;模擬鍵入用戶名、密碼、回車

;return

;按F9鍵停止所有熱鍵

F9::suspend

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

  • Tutorial and Overview This brief introduction will help y...
    Felixology閱讀 1,171評論 0 1
  • Spring Cloud為開發(fā)人員提供了快速構建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,551評論 19 139
  • 在日常的工作中有很多東西其實是在重復性操作。懶人就想出了許多懶辦法來提高效率。除了學習自己編程之外,其他有些東西還...
    鹿角海棠閱讀 1,475評論 2 2
  • “老板,來份面條,一個肉夾饃不放辣椒啊,一定不放辣椒啊吃不了辣?!边@是今兒中午在單位旁不遠的小店我點的午飯。沒成想...
    某酒館閱讀 964評論 1 1
  • 聊聊TTT 隨著移動互聯(lián)網(wǎng)深入的發(fā)展和對人們無時無刻的影響,培訓行業(yè)的多樣性和形式也出現(xiàn)了多種。國家下發(fā)的紅頭文件...
    林奎閱讀 1,314評論 0 2

友情鏈接更多精彩內容