AutoHotkey热键脚本语言文件
;=== AutoHotkey熱鍵腳本語言文件 autoHotkey.ini 從此行開始 === The Sart Line Of autoHotkey.ini AutoHotkey ScriptFile =================
;部分快捷鍵列表與簡短使用說明
;熱鍵???????????? 功能
;`????????????????? 打開程序軟件????? MasterSeeker 1.2 by DxCK MD5 0F7
;`? (~鍵位于Esc鍵正下方,Tab制表鍵正上方)
;ALT + `????????? 打開我的當前工作網(wǎng)盤文件夾
;http://www.kuaipan.cn/ 金山快盤 2T永久免費空間,最快最安全的同步網(wǎng)盤
;按熱鍵? Shift +? 空格鍵 打開_Total_Commander_Ver8.01
;ALT+S????????? 打開網(wǎng)站主頁????? http://www.so.com/
;熱鍵符號說明???? !表示按下Alt鍵???? #表示W(wǎng)in鍵???? ^表示Control鍵???? +表示Shift鍵
;=== 全局變量設(shè)置部分? ,只在一處設(shè)置,集中統(tǒng)一設(shè)置,便于今后修改維護 ====================================
;隱藏 AutoHotkey 在任務(wù)欄(桌面右下角)上的綠色H程序圖標
;#NoTrayIcon
;設(shè)置在例如 WinWait 這樣的命令中,參數(shù) WinTitle 的匹配模式。2 :匹配包含指定的 WinTitle 的窗口標題。
SetTitleMatchMode,2
SetWinDelay, 10
DetectHiddenWindows, On
;我的當前工作文件夾
;MyWorkingFolderWinTitle = D:\d\
;=== 跟隨Windows7自動啟動部分 ==========================================================
;等待58秒鐘后鎖定桌面
;Sleep, 58000
;Run Rundll32.exe user32.dll LockWorkStation
;檢查EXE文件是否存在
;檢查EXE文件是否已經(jīng)運行
;后臺隱藏窗口
;虛擬桌面 Dexpot
;Run, 虛擬桌面\虛擬桌面.exe
;Run, Everything\Everything.exe,,min
;快速彈出優(yōu)盤、移動硬盤
Run,MyUSBEjecter\MyUSBEjecter.exe,,min
;;Run ,C:\WINDOWS\system32\KISCOM\KISManager.exe /h
?
;=== 循環(huán)監(jiān)控守護部分從此行開始? ===================
;=== 系統(tǒng)空閑鎖定桌面,全自動關(guān)閉彈出廣告窗口,全自動隱藏后臺運行,全自動按窗口中的按鈕 ===
;--- 此子程序必需放在最前首先執(zhí)行否則無法正常自動運行? 全自動關(guān)閉 廣告窗口和其他禁止顯示的窗口---
;自從有了 AutoHotkey 后廣告窗口少了(只含有少量未及時發(fā)現(xiàn)未及時禁止的廣告窗口),窗口少了,
;圖標也少了(大多數(shù)程序的啟動都從TotalCommander8.50 破解版和AHK熱鍵啟動了)
Loop
? {
??? ;等待0.1秒 (即等待100毫秒)
??? Sleep,100
??? ;--- 檢查用戶輸入系統(tǒng)空閑時間(鼠標鍵盤無動作時間)并決定是否鎖定部分 ----------------------------------
??? ;用戶輸入系統(tǒng)空閑時間(鼠標鍵盤無動作時間)大于10分鐘則鎖定桌面
??? IfGreater, A_TimeIdle, 600000
????? {
??????? Run Rundll32.exe user32.dll LockWorkStation
????? }
??? ;--- 全自動隱藏窗口,有些窗口(例如迅雷下載窗口)必須存在才能完成某些任務(wù),但是有不想看見窗口,節(jié)約有限的顯示器空間,所以隱藏到后臺執(zhí)行 ---------------------
??? ;TrayIcon("PPLive.exe",0)??????? ;隱藏PPTV電影下載軟件任務(wù)欄圖標
??? ;TrayIcon(-1,0,"ID")??????????? ;隱藏所有托盤圖標
??? If WinExist("PPTV") or WinExist("PPLive") or WinExist("迅雷")? or WinExist("歡?? 迎使用百度云管家")?? or WinExist("KIS加密服務(wù)器")
????? {
??????? WinHide
????? }
??? WinHide, ahk_class XLUEFrameHostWnd
??? ;--- 關(guān)閉窗口部分 ,全自動關(guān)閉大量的彈出廣告窗口,從此我的顯示器上沒有廣告騷擾 ------------------------
??? If WinExist("ahk_class ck_fmt") or WinExist("迅雷資訊") or WinExist("搜狗輸入法提示您")? or? WinExist("騰訊網(wǎng)新聞")or? WinExist("騰訊大蘇網(wǎng)新聞")or? WinExist("PPTV今日焦點") or? WinExist("PPL Flash Window") or? WinExist("精彩推薦")? or? WinExist("搜狗今日新詞") or? WinExist("酷我今日看點") or? WinExist("360殺毒提醒您") or? WinExist("","已發(fā)現(xiàn)并成功刪除病毒文件") or? WinExist("ahk_class PopupRbWebDialog") or? WinExist("高速通道試用") or? WinExist("ahk_class XLUEFrameHostWnd") or? WinExist("搜狗今日新詞") or? WinExist("搜狗今日新詞") or? WinExist("搜狗今日新詞") or? WinExist("搜狗今日新詞")
????? {
??????? WinClose
??????? WinKill
????? }
??? ;--- 循環(huán)監(jiān)控守護打開程序部分 ,有時候會不小心關(guān)閉某些重要窗口(比如殺毒,騰訊QQ),當關(guān)閉或出錯(需要另外判斷)退出時全自動打開它 ------------------------
??? ;騰訊QQ守護程序,作用:使QQ保持打開狀態(tài)
??? Sleep,100
#Persistent
??? Sleep,100
??? Process,Exist,QQ.exe?? ;獲取A.exe的PID
??? Sleep,100
??? pc1:=ErrorLevel?? ;將返回值存入pc1, 如果不存在返回值為0。
??? Sleep,100
??? If(pc1=0)?? ;等于0, 說明A進程不存在
??? {
????? Sleep,100
????? ;判斷文件是否存在
????? ;IfNotExist
????? Run? "C:\Program Files\Tencent\QQ\Bin\qq.exe"
????? Sleep,100
??? }
??? Sleep,100
}
;=== 循環(huán)監(jiān)控守護部分到此行結(jié)束 ==================================================================
?
?
;=============== 測試實驗試驗部分 ===========================================================================
;----------? 按熱鍵 Shift + F11 鍵 測試命令行有效性? -------------------------------------------------------
;f11::run notepad
+f11::
? 窗口標題=MasterSeeker 1.2 by DxCK
/*
;ControlFocus, Filename,MasterSeeker
;WinGetClass,MyClass,A
;IfWinNotActive ,MasterSeeker 1.2 by DxCK
; WinGetTitle, MyActiveWindowTitle, A
;If ("%MyActiveWindowTitle%" <> MasterSeeker 1.2 by DxCK)
;IfWinNotExist, MasterSeeker 1.2 by DxCK
;If? (WinActive("MasterSeeker 1.2 by DxCK"))
;WinGetActiveTitle,MyTitle
;if (MyTitle= "MasterSeeker 1.2 by DxCK")
;WinGetClass,MyWinClass,%窗口標題%
;if(MyWinClass="WindowsForms10.Window.8.app.0.218f99c")
WinGet,MyWinCount,Count,%窗口標題%
If (MyWinCount = 0)
{
MsgBox,,,"If 條件語句中判斷表達式的值為 .真." %MyWinCount%,2
}
}
*/
? ;WinSetTitle,%窗口標題%,,"新的窗口標題"
? ;ControlSetText,Filename,請輸入需要搜索的文件名,%窗口標題%
? ControlSetText,ahk_class? SysHeader321,請輸入需要搜索的文件名,%窗口標題%
return
;=== 定義全局熱鍵部分 ===================================
?
?
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;=== AutoHotkey熱鍵腳本語言文件 autoHotkey.ini 從此行開始 === The Sart Line Of autoHotkey.ini AutoHotkey ScriptFile =================
;=== 定義全局熱鍵部分 ============
; ----- 按熱鍵 ` 打開本地磁盤文件搜索軟件 MasterSeeker_1.2_by_DxCK_MD5_0F7 -----
; ----- 快捷鍵 ` 即 ~ 鍵,位于 Esc 退出鍵正下方,位于 Tab 制表鍵正上方 -----
;使用方法:1、下載AutoHotkey和MasterSeeker,
;2、把下面的代碼復(fù)制到AutoHotkey的Edit This Script窗口中,
;3、Reload This Script重新裝入腳本后按~鍵。
?
; 打開文件后連續(xù)按 5 次PageDown向下翻頁鍵跳轉(zhuǎn)到此行
~::
? {
??? Send,{Shift Up}
??? ActiveOrHideMasterSeekerWindow()
??? return
? }
;===? AutoHotkey.ahk 熱鍵腳本語言文件 AutoHotkey.ini.ahk ===
;定義全局熱鍵 ` 打開本地磁盤文件搜索軟件 MasterSeeker_1.2_by_DxCK AHK 快捷鍵腳本
;自定義快捷鍵 ` 即 ~ 鍵位于 Esc 退出鍵正下方,位于 Tab 制表鍵正上方,共5步操作
`::
? {
??? ActiveOrHideMasterSeekerWindow()
??? return
? }
ActiveOrHideMasterSeekerWindow()
? {
??? ; 第1步 , 判斷可執(zhí)行程序文件是否存在
??? IfNotExist,MasterSeeker\MasterSeeker.exe
????? {
??????? MsgBox,,可執(zhí)行文件 MasterSeeker.exe 未找到,文件 %A_ScriptDir%\MasterSeeker\MasterSeeker.exe 不存在`n請到官方網(wǎng)站 http://www.master-seeker.com/ 重新下載,8
??????? return
????? }
??? 窗口標題=MasterSeeker 1.2 by DxCK
??? WinGet,MyWinCount,Count,%窗口標題%
??? Sleep,100
??? If (MyWinCount = 0)
????? {
??????? WinGetClass,MyWinClass,%窗口標題%
??????? Sleep,100
??????? If (not(MyWinClass="WindowsForms10.Window.8.app.0.218f99c"))
????????? {
??????????? WinGetTitle,MyTitle,%窗口標題%
??????????? Sleep,100
??????????? If (not(MyTitle= "MasterSeeker 1.2 by DxCK"))
????????????? {
??????????????? Sleep,100
??????????????? IfWinNotExist,%窗口標題%???; 第2步 , 如果程序未運行那么運行程序
????????????????? {
??????????????????? Run,MasterSeeker\MasterSeeker.exe,,max
????????????????? }
????????????? }
????????? }
????? }
??? WinGet,Style1 ,Style,%窗口標題%??; 第3步 , 激活并最大化窗口或者隱藏窗口
??? ; 判斷窗口是否包含WS_VISIBLE樣式,就是窗口是否可見
??? If ((Style1&0x10000000) and (WinActive("MasterSeeker 1.2 by DxCK")))
????? {
??????? WinMinimize,%窗口標題%
??????? WinHide,%窗口標題%
??????? ToolTip
??????? return
????? }
??? Else
????? {
ReDllCall_WindowsAPI_SwitchToThisWindow_Again_To_ActiveWindow:
? SetWinDelay, 10
? SetTitleMatchMode,2
? DetectHiddenWindows, On
? ; 激活窗口(即把窗口放到前臺,設(shè)置為頂層窗口)
? WinShow,%窗口標題%
? WinActivate,%窗口標題%
#WinActivateForce
? WinActivate,%窗口標題%
? WinGet, winid, ID,%窗口標題%
? DllCall("SwitchToThisWindow", "UInt", winid, "UInt", 1)
? ;最大化窗口
? WinMaximize,%窗口標題%
? ;檢查判斷激活窗口是否完成,如果激活窗口失敗那么重新嘗試激活。
? IfWinNotActive ,%窗口標題%
??? {
????? ;跳轉(zhuǎn)到激活窗口的標簽并繼續(xù)重新嘗試激活目標窗口。
????? Goto ,? ReDllCall_WindowsAPI_SwitchToThisWindow_Again_To_ActiveWindow
??? }??????????; 第4步 、選中搜索輸入框,使輸入框獲得焦點
? ;可以通過窗口句柄窗口信息顯示工具來取得并測試窗口的信息
? ;Spy++ Lite V2.4 ; 或者用 ViewWizard 2.8.0? ;或者用 句柄精靈 3.0
? ;當設(shè)置 Control 參數(shù)為空或省略,目標窗口的頂端控件將被使用。
? ;然后通過 Send,{TAB} 跳轉(zhuǎn)到目標控件
? ControlFocus,Filename,%窗口標題%
? Send,{End}
? Send,+{home}???????;第5步、操作完成,提示用戶輸入搜索關(guān)鍵字
? Send,{Shift Up}
? ToolTip, 請輸入需要搜索的文件名,100,50
? ;啟動定時器,在3秒鐘后清空 提示 ToolTip 的提示窗口內(nèi)容
? SetTimer, RemoveToolTip, 3000
return? ;千萬不要忘記 return 結(jié)束熱鍵執(zhí)行代碼塊定義
RemoveToolTip:
? SetTimer, RemoveToolTip, Off
? ToolTip
return??????????;? 2014年4月? 曉亮原創(chuàng)
}
;文件: D:\Personal\AutoHotkey\MasterSeeker\MasterSeeker.exe?Hash MD5 校驗和 信息
; MasterSeeker _ 1.2 _ by _ DxCK.EXE? MD5: 0F75? SHA1: 6DB1 CRC32: 2207
}
?
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
?
?
?
?
?
;---------- 按熱鍵? ALT + ` (~鍵位于Esc鍵正下方) 打開當前工作文件夾? ----------------------------------
!`::
? {
??? WinMinimizeAll
??? FileCreateDir, D:\快盤\
??? Run , "D:\快盤\",,max
??? WinMinimizeAll
??? IfWinExist ,D:\快盤
????? {
??????? WinActivate
??????? WinActivateBottom,D:\快盤
??????? WinMaximize
#WinActivateForce
????? }
??? IfWinExist ,D:\快盤
????? {
??????? WinActivate
??????? WinActivateBottom,D:\快盤
??????? WinMaximize
#WinActivateForce
????? }
? }
return
;---------- 按熱鍵? Shift +? 空格鍵 打開_Total_Commander_Ver8.01? ----------------------------------
+Space::
? {
??? Run, TC850RC1\TC850RC1.bat,,hide
? }
return
;--- ;ALT+S????????? 打開網(wǎng)站主頁????? http://www.so.com/ --------------------------------
!s::
? ;存在多行命令時熱鍵后的代碼必須換行(另起一行)
? SetTitleMatchMode,2
? {
??? IfWinExist? 360搜索 - 干凈、安全、可信任的搜索引擎 - 搜狗高速瀏覽器
??????? WinActivate
??? Else
????? {
??????? Run "C:\Users\Administrator\AppData\Roaming\360se\bin\360se.exe" http://www.so.com/
??????? Sleep,2000? ; 2秒
????? }
? }
return
;----------? 按熱鍵 Pause/Break 鍵 本腳本暫停480秒? -------------------------------------------------------
Pause::
? ;IfPaused{ReRun}
? {
??? MsgBox,64,本腳本暫停480秒,本腳本暫停480秒,1
??? Sleep,480000
? }
return
;----------? 按熱鍵 Pause/Break 鍵 暫停或者啟動本腳本? -------------------------------------------------------
;Pause::Pause
;---------- 按熱鍵? `? 立即鎖定桌面? ----------------------------------
;`::Run Rundll32.exe user32.dll LockWorkStation
?
?
;----------? 按熱鍵 Alt+A 打開本腳本? -------------------------------------------------------
!a::
? Run, %A_ScriptDir%\SciTE\SciTE.exe autoHotkey.ahk,,Max
? Sleep? 1500
? IfWinExist? ,SciTE4AutoHotkey
??? {
????? ;WinActivate
????? ;WinMaximize
????? ;?? Sleep 500
????? ;?? Send {AltDown}{L Down}
????? ;?? Sleep 200
????? ;?? Send {L Up}{AltUp}
????? ;?? Sleep 200
????? ;?? Send {A Down}{A Up}
??? }
return
;---------- 按熱鍵? Ctrl + B? 打開 BaiduDiskSearch 百度硬盤搜索 ----------------------------------
^b::run "C:\Program Files\Baidu\Disk Search\BaiduDiskSearch.exe"
? ;---------- 按熱鍵? Alt + `? 打開 Search Everything 本地文件快速閃電查找搜索工具? ----------------------------------
? ;;^`::run "D:\Personal\AutoHotkey\Everything\Everything.exe"
? ;---------- 按熱鍵? Alt + `? 打開 Search Everything 本地文件快速閃電查找搜索工具? ----------------------------------
#`::run "D:\快盤"
? ;---------- 按熱鍵? Ctrl + W? 打開 Microsoft Office Word 2003 ( 文件擴展名是 .doc? 可執(zhí)行文件是 winword.exe 熱鍵Ctrl+W )? ----------------------------------
!w::run "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.exe"
? ;---------- 按熱鍵? Ctrl + E? 打開 Microsoft Office Excel 2003 ( 文件擴展名是 .xls? 可執(zhí)行文件是 excel.exe 熱鍵Ctrl+E)? ----------------------------------
!e::run "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.exe"
?
/*
;---------- 按熱鍵? `? 打開我的當前工作文件夾? D:\D? ----------------------------------
`::
{
;存在多行命令時熱鍵后的代碼必須換行(另起一行)
SetTitleMatchMode,2
IfWinExist? %MyWorkingFolderWinTitle%
{
WinActivate
WinGetPos,,, Width, Height, %MyWorkingFolderWinTitle%
while? (Width<>A_ScreenWidth) or (Height<> A_ScreenHeight)
{
WinMove, %MyWorkingFolder% ,,0,0, A_ScreenWidth, A_ScreenHeight
}
Send? ,{alt down}{v}{alt up}
Sleep , 10
Send , {s}
}
Else
{
Run %MyWorkingFolderWinTitle%
WinWait, %MyWorkingFolderWinTitle%
WinActivate ,%MyWorkingFolderWinTitle%
WinGetPos,,, Width, Height, %MyWorkingFolderWinTitle%
while? (Width<>A_ScreenWidth) or (Height<> A_ScreenHeight)
{
WinMove, %MyWorkingFolder% ,,0,0, A_ScreenWidth, A_ScreenHeight
}
Send? ,{alt down}{v}{alt up}
Sleep , 10
Send , {s}
}
}
return
;---------- 按熱鍵? `? 打開我的當前工作文件夾? D:\D? ----------------------------------
*/
? ;---------- 按熱鍵? Win+B? 關(guān)閉LED液晶顯示器? ----------------------------------
? ;----------------------------------------Turn off Monitor----------------------------------------------
#B::? ;turn off the monitor.
? Sleep 1000? ; Give user a chance to release keys (in case their release would wake up the monitor again).
? ; Turn Monitor Off:
? SendMessage, 0x112, 0xF170, 2,, Program Manager? ; 0x112 is WM_SYSCOMMAND, 0xF170 is SC_MONITORPOWER.
? ; Note for the above: Use -1 in place of 2 to turn the monitor on.
? ; Use 1 in place of 2 to activate the monitor's low-power mode.
return
;----------? 按熱字串 SO空格 啟動360搜索? ----------------------------------------------------
;::so::
;存在多行命令時熱鍵后的代碼必須換行(另起一行)
;? SetTitleMatchMode,2
;? {
;??? IfWinExist? 360搜索 - 干凈、安全、可信任的搜索引擎 - 搜狗高速瀏覽器
;??????? WinActivate
;??? Else
;????? {
;?????? Run "C:\Users\Administrator\AppData\Roaming\360se\bin\360se.exe" http://www.so.com
;??????? Sleep,2000? ; 2秒
;????? }
;? }
;return
?
?
;----------? 按熱鍵 Win+V 打開我的工作目錄文件夾 D:\D? --------------------------------
#v::
? IfWinExist D:\D
????? WinActivate
? Else
????? Run "D:\D"
return
;----------? 按熱鍵 Ctrl+Alt+F 打開FindOnClick? ------------------------------------------------
^#F::run C:\FindOnClick\FindOnClick.exe
? ;----------? 按熱鍵 Alt+C 打開我的個人主頁? ------------------------------------------------
? ;!c::run http://cnblogs.com/delphichm
? ;----------? 按熱鍵 Ctrl+F12 清理我的桌面? ------------------------------------------------
^F12::
? Run? ,D:\Personal\AutoRun\清理桌面圖標\清理桌面圖標.bat, ,Hide
return
;----------? 按熱鍵 Ctrl+Alt+F12 清理我的桌面? ------------------------------------------------
^!F12::
? Run? ,D:\Personal\AutoRun\清理桌面圖標\所有桌面圖標.bat, ,Hide
? Send {LWin Down}{d Down}{d Up}{LWin Up}
? Send ,{F5 Down}{F5 Up}
return
;F11::run "D:\SaveLog\SourceCode\zSaveLogProject.exe"
;Win+E:: 資源管理器
;Alt+`? Everything磁盤搜索
;Ctrl+`? 金山詞霸
;Shift+Space? Total_Commander_8.01
;Alt+E? UltraEdit
;Alt+S? so.com網(wǎng)站
;Alt+D? 我的工作目錄文件夾 X:\D (X為我的移動硬盤盤符)
;Ctrl+Alt+W 打開我的文檔 Alt+D 為QQ熱鍵
!^w::run D:\Personal\我的文檔
? ;語音計算機
!^c::run d:\AutoHotkey\語音計算器
? ;F10::Run D:\y應(yīng)收款\ysk.exe
?
? ;#!d::run "C:\Program Files\DAEMON Tools Pro\DTPro.exe"
? ;按Shift+Alt+D打開Delphi2006
!+d::Run "C:\Program Files\Embarcadero\RAD Studio\10.0\bin\bds.exe" -pDelphi
return
;按Alt+E打開UltraEdit
;!e::
;run uedit32
;在上面的最后一行,"return" 用來結(jié)束熱鍵。
;不過,如果一個熱鍵僅僅需要執(zhí)行一行,那么這行可以列在雙冒號的右邊。
;換句話說,return 可以省略:
return
;按Win+2打開www.265.com網(wǎng)站,可以連續(xù)按Ctrl鍵2次來打開
#2::
? ;存在多行命令時熱鍵后的代碼必須換行(另起一行)
? SetTitleMatchMode,2
? {
??? ;IfWinExist 網(wǎng)盤搜索引擎 - 搜狗高速瀏覽器
??? ;WinActivate
??? ;Else
??? {
????? Run "C:\Documents and Settings\Administrator\Application Data\360se6\Application\360se.exe" http://www.265.com/
????? ;Sleep,2000? ; 2秒
??? }
? }
;SetKeyDelay,0
;Send {AltDown}{d Down}{d Up}{AltUp}{TABDown}{TABUp}
return
;按Win+S打開so.com網(wǎng)站,可以連續(xù)按Ctrl鍵2次來打開
;#s::
;存在多行命令時熱鍵后的代碼必須換行(另起一行)
;SetTitleMatchMode,2
;{
;IfWinExist 網(wǎng)盤搜索引擎 - 搜狗高速瀏覽器
;WinActivate
;Else
;{
; Run "C:\Users\Administrator\AppData\Roaming\360se\bin\360se.exe" http://www.so.com/
;Sleep,2000? ; 2秒
; }
; }
;SetKeyDelay,0
;Send {AltDown}{d Down}{d Up}{AltUp}{TABDown}{TABUp}
;return
;按Win+Z打開autohotkey.com網(wǎng)站
#z::Run www.autohotkey.com
return
;按Ctrl+Alt+N打開記事本,于QQ熱鍵沖突,這里只是個例子取消了
;^!n::
;IfWinExist Untitled - Notepad
; WinActivate
;else
; Run Notepad
;return
;按Ctrl+Alt+Home重新啟動
^!Home::
? Run Shutdown? -f -r -t 1
? ;Run ToolsSoftware\FastReset_Ctrl_Alt_Home
? MsgBox,16,Force Reset,Force Reset,33
? MsgBox,16,Force Reset,Force Reset,33
return
;按Win+Home重新登錄
#Home::
? Run Shutdown -l -f
? MsgBox,16,Force LogOut,Force LogOut,33
? MsgBox,16,Force LogOut,Force LogOut,33
return
;按Ctrl+Alt+End關(guān)機
^!End::
? ;Run FastPowerOFF_Ctrl_Alt_End\FastPowerOFF_Ctrl_Alt_End.exe
? Run Shutdown? -f -s -t 1
? MsgBox,16,Force PowerOFF,Force PowerOFF,33
? MsgBox,16,Force PowerOFF,Force PowerOFF,33
return
?
?
?
?
?
?
?
?
?
; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded.? So feel free to customize it to suit your needs.
; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks.? It also explains more about hotkeys.
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments.? They are not executed.
; This script has a special filename and path because it is automatically
; launched when you run the program directly.? Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it.? You can have as many .ahk
; files as you want, located in any folder.? You can also run more than
; one ahk file simultaneously and each will get its own tray icon.
; SAMPLE HOTKEYS: Below are two sample hotkeys.? The first is Win+Z and it
; launches a web site in the default browser.? The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one).? To
; try out these hotkeys, run AutoHotkey again, which will load this file.
;#s::
;Send, Sincerely,{enter}John Smith
;return
;在上面的例子中,除了{enter}意外所有的字符都被逐字發(fā)送,因為{enter}模擬了回車鍵。下面的將舉例說明一些其它常用的特殊字符:
;Send, ^c!{tab}pasted:^v
;上面的例子將會發(fā)送Control+C(復(fù)制),然后是Alt+Tab(切換窗口),最后是發(fā)送字串“pasted:”并接上一個Control+V(粘貼)。
?
?
?
/*
REM 創(chuàng)建目錄
md D:\Personal\桌面bak\
REM 備份桌面文件
start /min xcopy /e /c /i /q /r /y C:\Users\Public\Desktop\*.* D:\Personal\桌面bak\
xcopy /e /c /i /q /r /y C:\Users\Public\Desktop\*.* D:\Personal\桌面bak\
xcopy /e /c /i /q /r /y C:\Users\Public\Desktop\*.* D:\Personal\桌面bak\
start /min xcopy /e /c /i /q /r /y D:\Personal\桌面\*.* D:\Personal\桌面bak\
xcopy /e /c /i /q /r /y D:\Personal\桌面\*.* D:\Personal\桌面bak\
xcopy /e /c /i /q /r /y D:\Personal\桌面\*.* D:\Personal\桌面bak\
REM 清理桌面文件
REM 跳轉(zhuǎn)到D:盤
D:
REM 改變當前目錄以便使用deltree.exe
cd D:\Personal\AutoRun\清理桌面圖標
start /min deltree /y C:\Users\Public\Desktop\*.*
start /min deltree /y D:\Personal\桌面\*.*
deltree /y C:\Users\Public\Desktop\*.*
deltree /y D:\Personal\桌面\*.*
REM 恢復(fù)桌面默認圖標
start /min xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份\*.* C:\Users\Public\Desktop\
xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌A面圖標\桌面圖標備份\*.* C:\Users\Public\Desktop\
start /min xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份\網(wǎng)上開票.url C:\Users\Public\Desktop\
xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份\網(wǎng)上開票.url C:\Users\Public\Desktop\
start /min xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份\客戶查詢.xls C:\Users\Public\Desktop\
xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份\客戶查詢.xls C:\Users\Public\Desktop\
start /min xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份A\金蝶財務(wù).lnk C:\Users\Public\Desktop\
xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面圖標\桌面圖標備份\金蝶財務(wù).lnk C:\Users\Public\Desktop\
exit
*/
;AutoHotkey熱鍵腳本語言文件
;autoHotkey.ini
;本文件最后編輯時間
;2014年4月12日5點58分
;2014年4月11日5點58分
;2014年1月23日5點58分
;本文件在Microsoft Windows 7 旗艦版中測試通過
?
/*
按熱鍵Alt+A打開本AutoHotkey熱鍵腳本語言文件
本腳本的最新版網(wǎng)址 http://www.cnblogs.com/delphichm
本腳本由delphi不斷更新中,本腳本的部分內(nèi)容來自于互聯(lián)網(wǎng)搜索引擎
http://www.265.com
http://www.hao123.com/
http://www.so.com
http://www.baidu.com
可以借助Delphi等工具來實現(xiàn)更多的功能
本人可以在有空的時候免費無償?shù)幕卮鹨恍┯嘘P(guān)ahk和delphi方面的問題
我的騰訊QQ聊天號碼是 595076941 如果我不在線可能是隱身或沒時間登錄
在我離線時你仍然可以發(fā)送信息給我,等我有空時會回復(fù)信息的!
*/
/*
; 下面的例子移動一個文件夾內(nèi)的所有文件和文件夾到一個不同的文件夾:
ErrorCount := MoveFilesAndFolders("D:\Personal\桌面\*.*", "D:\Personal\桌面?zhèn)浞輁")
;If ErrorCount <> 0
;??? MsgBox %ErrorCount% 個文件/文件夾不能被移動。
;MoveFilesAndFolders(SourcePattern, DestinationFolder, DoOverwrite = false)
MoveFilesAndFolders(SourcePattern, DestinationFolder, DoOverwrite = false)
; 移動所有匹配 SourcePattern 的文件和文件夾到名為 DestinationFolder 的文件夾
; 并返回不能被移動的文件/文件夾的數(shù)量。此函數(shù)需要 v1.0.38+
; 因為它使用了 FileMoveDir 的模式 2 。
{
FileCreateDir , %DestinationFolder%
If DoOverwrite = 1
DoOverwrite = 2 ; 請看 FileMoveDir 關(guān)于模式 2 對模式 1 的描述。
; 首先移動所有文件(而不是文件夾):
FileMove, %SourcePattern%, %DestinationFolder%, %DoOverwrite%
ErrorCount := ErrorLevel
; 現(xiàn)在移動所有的文件夾:
Loop, %SourcePattern%, 2 ; 2 表示 "僅獲取文件夾" 。
{
FileMoveDir, %A_LoopFileFullPath%, %DestinationFolder%\%A_LoopFileName%, %DoOverwrite%
ErrorCount += ErrorLevel
If ErrorLevel ; 報告每一個有問題的文件夾名稱。
MsgBox 不能移動 %A_LoopFileFullPath% 到 %DestinationFolder% 。
}
return ErrorCount
}
FileCopy,D:\Personal\默認桌面\*.* , D:\Personal\桌面\
*/
/*
;---------- 按熱鍵? `? 立即打開本地磁盤文件搜索軟件 MasterSeeker 1.2 by DxCK?? MD5_0F7?? ----------------------------------
`::
;最小化所有窗口
WinMinimizeAll
;如果沒有文件夾那么提示出錯
;如果沒有文件那么提示出錯
;如果程序沒有運行那么運行程序
;Process,Exist,MasterSeeker.exe
;NewPID = %ErrorLevel%? ; Save the value immediately since ErrorLevel is often changed.
;if NewPID = 0;當? %ErrorLevel% 等于 0 表示進程不存在
;由于可執(zhí)行文件名有可能被用戶修改所以
;???? 這里使用相對穩(wěn)定的不大會更改的窗口標題是否存在來判斷程序是否已經(jīng)運行,防止重復(fù)運行
;If? not WinExist("MasterSeeker 1.2 by DxCK")
;? {
;??? Run , "MasterSeeker\MasterSeeker.exe",,max
;? }
Process,Exist,MasterSeeker.exe
NewPID = %ErrorLevel%? ; Save the value immediately since ErrorLevel is often changed.
if NewPID = 0 ;當? %ErrorLevel% 等于 0 表示進程不存在
{
Run , "MasterSeeker\MasterSeeker.exe",,max
}
;如果窗口沒有激活那么激活窗口IfWinNotActive,"MasterSeeker 1.2 by DxCK"
while?? (Not WinActive("MasterSeeker 1.2 by DxCK"))
{
Sleep ,1
IfWinNotActive,"MasterSeeker 1.2 by DxCK"
{
WinActivate
WinMaximize
; WinActivateBottom,MasterSeeker 1.2 by DxCK
;#WinActivateForce
;WinWaitActive,"MasterSeeker\MasterSeeker.exe",,1
}
Sleep,200
}
;如果輸入框沒有獲得焦點那么選中輸入框
MouseClick, left,111,111
Send,{Tab}
Send,{Tab}
;操作完成,提示用戶輸入關(guān)鍵字
; MsgBox Please InputYour KeyWord to Search it
return? ;千萬不要忘記 return 結(jié)束熱鍵執(zhí)行代碼塊定義
;文件: D:\Personal\AutoHotkey\MasterSeeker\MasterSeeker_MD5_0F7.exe
;大小: 989184 字節(jié)
;文件版本: 1.2.0.1
;修改時間: 2011年9月30日, 22:26:12
;MD5: 0F75BA8717362BD078487E567A4D8C16
;SHA1: 6DB1F9ABDEA4A7E9CF5612C6458A0817B5482988
;CRC32: 220755B3
*/
;=== AutoHotkey熱鍵腳本語言文件 autoHotkey.ini 到此行結(jié)束 === The End Line Of autoHotkey.ini AutoHotkey ScriptFile =================
?
/*
?
;== AutoHotkey熱鍵腳本語言文件 AutoHotkey.ini === AutoHotkey.ahk ==
; ---? 按熱鍵? `? 打開本地磁盤文件搜索軟件 MasterSeeker_1.2_by_DxCK? ----
; ---? 快捷鍵? `? 即 ~ 鍵,位于 Esc 退出鍵正下方,位于 Tab 制表鍵上方? ----
`::
; 第1步 , 判斷可執(zhí)行程序文件是否存在
IfNotExist,MasterSeeker\MasterSeeker.exe
{
MsgBox,文件 MasterSeeker\MasterSeeker.exe 不存在
return
}
; 第2步 , 如果程序未運行那么運行程序
IfWinNotExist, MasterSeeker 1.2 by DxCK
{
Run,MasterSeeker\MasterSeeker.exe,,max
}
; 第3步 , 激活窗口(把窗口放到前臺,設(shè)置為頂層窗口)并最大化窗口
; 不知道是什么原因,窗口是否激活總是誤判,這里只好啰嗦一點了
Loop,3
{
WinGetTitle, MyActiveWindowTitle, A
Sleep,50
while??? ("%MyActiveWindowTitle%" <> "MasterSeeker 1.2 by DxCK" )
{
Sleep,50
while??? ("%MyActiveWindowTitle%" <> "MasterSeeker 1.2 by DxCK" )
{
;調(diào)用激活窗口的子程序函數(shù)過程代碼塊
ToggleWinMinimize("MasterSeeker 1.2 by DxCK")
WinMaximize
WinGetTitle, MyActiveWindowTitle, A
Sleep,50
}
}
}
; 第4步 、 如果搜索輸入框沒有獲得焦點那么選中搜索輸入框
;可以通過窗口句柄窗口信息顯示工具來取得并測試窗口的信息
;Spy++ Lite V2.4
;ViewWizard 2.8.0
;句柄精靈 3.0
;如果無法取得窗口的信息可以將 Control 參數(shù)為空或省略,目標窗口的頂端控件將被使用。
;然后通過 Send,{TAB} 跳轉(zhuǎn)到目標控件
Sleep,10
ControlFocus,Filename ,MasterSeeker 1.2 by DxCK
Sleep,10
Send,{End}
Sleep,10
Send,+{home}
Sleep,10
;第5步、操作完成,提示用戶輸入關(guān)鍵字
; #Persistent
ToolTip, 請輸入需要搜索的文件名,100,50
SetTimer, RemoveToolTip, 3000
return? ;千萬不要忘記 return 結(jié)束熱鍵執(zhí)行代碼塊定義
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
;定義子程序過程函數(shù)代碼模塊
ToggleWinMinimize(TheWindowTitle)
{
SetTitleMatchMode,2
DetectHiddenWindows, On
IfWinActive, %TheWindowTitle%
{
;WinMinimize, %TheWindowTitle%
;WinMaximize
}
Else
{
IfWinExist, %TheWindowTitle%
{
WinGet, winid, ID, %TheWindowTitle%
DllCall("SwitchToThisWindow", "UInt", winid, "UInt", 1)
;WinMaximize
}
}
return
}
*/
轉(zhuǎn)載于:https://www.cnblogs.com/delphichm/p/3473008.html
《新程序員》:云原生和全面數(shù)字化實踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的AutoHotkey热键脚本语言文件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: FlashInspector 【Fire
- 下一篇: javascript和“主流大型语言”(