;=== AutoHotkey热键脚本语言文件 autoHotkey.ini 从此行开始 === The Sart Line Of autoHotkey.ini AutoHotkey ScriptFi...

;=== AutoHotkey热键脚本语言文件 autoHotkey.ini 从此行开始 === The Sart Line Of autoHotkey.ini AutoHotkey ScriptFile =================

;部分快捷键列表与简短使用说明
;热键             功能
;`                  打开程序软件      MasterSeeker 1.2 by DxCK MD5 0F7
;`  (~键位于Esc键正下方,Tab制表键正上方)
;ALT + `          打开我的当前工作网盘文件夹
;http://www.kuaipan.cn/ 金山快盘 2T永久免费空间,最快最安全的同步网盘
;按热键  Shift +  空格键 打开_Total_Commander_Ver8.01
;ALT+S          打开网站主页      http://www.so.com/

;热键符号说明     !表示按下Alt键     #表示Win键     ^表示Control键     +表示Shift键

;=== 全局变量设置部分  ,只在一处设置,集中统一设置,便于今后修改维护 ====================================
;隐藏 AutoHotkey 在任务栏(桌面右下角)上的绿色H程序图标
;#NoTrayIcon

;设置在例如 WinWait 这样的命令中,参数 WinTitle 的匹配模式。2 :匹配包含指定的 WinTitle 的窗口标题。
SetTitleMatchMode,2
SetWinDelay, 10
DetectHiddenWindows, On

;我的当前工作文件夹
;MyWorkingFolderWinTitle = D:\d\

;=== 跟随Windows7自动启动部分 ==========================================================
;等待58秒钟后锁定桌面
;Sleep, 58000
;Run Rundll32.exe user32.dll LockWorkStation

;检查EXE文件是否存在
;检查EXE文件是否已经运行
;后台隐藏窗口
;虚拟桌面 Dexpot
;Run, 虚拟桌面\虚拟桌面.exe
;Run, Everything\Everything.exe,,min

;快速弹出优盘、移动硬盘
Run,MyUSBEjecter\MyUSBEjecter.exe,,min

;;Run ,C:\WINDOWS\system32\KISCOM\KISManager.exe /h

 

;=== 循环监控守护部分从此行开始  ===================
;=== 系统空闲锁定桌面,全自动关闭弹出广告窗口,全自动隐藏后台运行,全自动按窗口中的按钮 ===
;--- 此子程序必需放在最前首先执行否则无法正常自动运行  全自动关闭 广告窗口和其他禁止显示的窗口---
;自从有了 AutoHotkey 后广告窗口少了(只含有少量未及时发现未及时禁止的广告窗口),窗口少了,
;图标也少了(大多数程序的启动都从TotalCommander8.50 破解版和AHK热键启动了)
Loop
  {
    ;等待0.1秒 (即等待100毫秒)
    Sleep,100
    ;--- 检查用户输入系统空闲时间(鼠标键盘无动作时间)并决定是否锁定部分 ----------------------------------
    ;用户输入系统空闲时间(鼠标键盘无动作时间)大于10分钟则锁定桌面
    IfGreater, A_TimeIdle, 600000
      {
        Run Rundll32.exe user32.dll LockWorkStation
      }

    ;--- 全自动隐藏窗口,有些窗口(例如迅雷下载窗口)必须存在才能完成某些任务,但是有不想看见窗口,节约有限的显示器空间,所以隐藏到后台执行 ---------------------
    ;TrayIcon("PPLive.exe",0)        ;隐藏PPTV电影下载软件任务栏图标
    ;TrayIcon(-1,0,"ID")            ;隐藏所有托盘图标
    If WinExist("PPTV") or WinExist("PPLive") or WinExist("迅雷")  or WinExist("欢   迎使用百度云管家")   or WinExist("KIS加密服务器")
      {
        WinHide
      }
    WinHide, ahk_class XLUEFrameHostWnd
    ;--- 关闭窗口部分 ,全自动关闭大量的弹出广告窗口,从此我的显示器上没有广告骚扰 ------------------------
    If WinExist("ahk_class ck_fmt") or WinExist("迅雷资讯") or WinExist("搜狗输入法提示您")  or  WinExist("腾讯网新闻")or  WinExist("腾讯大苏网新闻")or  WinExist("PPTV今日焦点") or  WinExist("PPL Flash Window") or  WinExist("精彩推荐")  or  WinExist("搜狗今日新词") or  WinExist("酷我今日看点") or  WinExist("360杀毒提醒您") or  WinExist("","已发现并成功删除病毒文件") or  WinExist("ahk_class PopupRbWebDialog") or  WinExist("高速通道试用") or  WinExist("ahk_class XLUEFrameHostWnd") or  WinExist("搜狗今日新词") or  WinExist("搜狗今日新词") or  WinExist("搜狗今日新词") or  WinExist("搜狗今日新词")
      {
        WinClose
        WinKill
      }


    ;--- 循环监控守护打开程序部分 ,有时候会不小心关闭某些重要窗口(比如杀毒,腾讯QQ),当关闭或出错(需要另外判断)退出时全自动打开它 ------------------------
    ;腾讯QQ守护程序,作用:使QQ保持打开状态
    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
}

;=== 循环监控守护部分到此行结束 ==================================================================

 

 


;=============== 测试实验试验部分 ===========================================================================

;----------  按热键 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

;=== 定义全局热键部分 ===================================

 

 

 

 

 

 

 

 

 


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

 

 

 

 

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; 打开文件后连续按 5 次PageDown向下翻页键跳转到此行

 

;===  AutoHotkey.ahk 热键脚本语言文件 AutoHotkey.ini.ahk ===
;定义全局热键 ` 打开本地磁盘文件搜索软件 MasterSeeker_1.2_by_DxCK AHK 快捷键脚本
;自定义快捷键 ` 即 ~ 键位于 Esc 退出键正下方,位于 Tab 制表键正上方,共5步操作
`::           ; 第1步 , 判断可执行程序文件是否存在
  窗口标题=MasterSeeker 1.2 by DxCK
  IfNotExist,MasterSeeker\MasterSeeker.exe
    {
      MsgBox,文件 MasterSeeker\MasterSeeker.exe 不存在
      return
    }
  Sleep,10
  WinGet,MyWinCount,Count,%窗口标题%
  Sleep,10
  If (MyWinCount = 0)
    {
      Sleep,10
      WinGetClass,MyWinClass,%窗口标题%
      Sleep,10
      If (not(MyWinClass="WindowsForms10.Window.8.app.0.218f99c"))
        {
          Sleep,10
          WinGetTitle,MyTitle,%窗口标题%
          Sleep,10
          If (not(MyTitle= "MasterSeeker 1.2 by DxCK"))
            {
              Sleep,10
              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
  ; 激活窗口(即把窗口放到前台,设置为顶层窗口)
  WinShow,%窗口标题%
  WinActivate,%窗口标题%
#WinActivateForce
  WinActivate,%窗口标题%
  WinGet, winid, ID,%窗口标题%
  DllCall("SwitchToThisWindow", "UInt", winid, "UInt", 1)
  ;最大化窗口
  WinMaximize,%窗口标题%
  ;检查判断激活窗口是否完成,如果激活窗口失败那么重新尝试激活。
  IfWinNotActive ,%窗口标题%
    {
      ;跳转到激活窗口的标签并继续重新尝试激活目标窗口。
      Goto ,  ReDllCall_WindowsAPI_SwitchToThisWindow_Again_To_ActiveWindow
    }          ; 第4步 、选中搜索输入框,使输入框获得焦点
  ;可以通过窗口句柄窗口信息显示工具来取得并测试窗口的信息
  ;Spy++ Lite V2.4 ; 或者用 ViewWizard 2.8.0  ;或者用 句柄精灵 3.0
  ;当设置 Control 参数为空或省略,目标窗口的顶端控件将被使用。
  ;然后通过 Send,{TAB} 跳转到目标控件

  ControlFocus,Filename,%窗口标题%
  Send,{End}
  Send,+{home}       ;第5步、操作完成,提示用户输入搜索关键字
  Send,{Shift Up}
  ToolTip, 请输入需要搜索的文件名,100,50
  ;启动定时器,在3秒钟后清空 提示 ToolTip 的提示窗口内容
  SetTimer, RemoveToolTip, 3000
return  ;千万不要忘记 return 结束热键执行代码块定义
RemoveToolTip:
  SetTimer, RemoveToolTip, Off
  ToolTip
return          ;  2014年4月  晓亮原创
}
;文件: 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          打开网站主页      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::
  {
    MsgBox,64,本脚本暂停480秒,本脚本暂停480秒,1
    Sleep,480000
  }
return


;----------  按热键 Pause/Break 键 暂停或者启动本脚本  -------------------------------------------------------
;Pause::Pause

;---------- 按热键  `  立即锁定桌面  ----------------------------------
;`::Run Rundll32.exe user32.dll LockWorkStation

 

 

;----------  按热键 Alt+A 打开本脚本  -------------------------------------------------------
!a::
  Run, .\SciTE\SciTE.exe autoHotkey.ahk
  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  可执行文件是 winword.exe 热键Ctrl+W )  ----------------------------------
!w::run "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.exe"

  ;---------- 按热键  Ctrl + E  打开 Microsoft Office Excel 2003 ( 文件扩展名是 .xls  可执行文件是 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  关闭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网站
;Alt+D  我的工作目录文件夹 X:\D (X为我的移动硬盘盘符)

;Ctrl+Alt+W 打开我的文档 Alt+D 为QQ热键
!^w::run D:\Personal\我的文档
  ;语音计算机
!^c::run d:\AutoHotkey\语音计算器

  ;F10::Run D:\y应收款\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" 用来结束热键。
;不过,如果一个热键仅仅需要执行一行,那么这行可以列在双冒号的右边。
;换句话说,return 可以省略:
return

;按Win+2打开www.265.com网站,可以连续按Ctrl键2次来打开
#2::
  ;存在多行命令时热键后的代码必须换行(另起一行)
  SetTitleMatchMode,2
  {
    ;IfWinExist 网盘搜索引擎 - 搜狗高速浏览器
    ;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网站,可以连续按Ctrl键2次来打开
;#s::
;存在多行命令时热键后的代码必须换行(另起一行)
;SetTitleMatchMode,2
;{
;IfWinExist 网盘搜索引擎 - 搜狗高速浏览器
;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网站
#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关机
^!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}意外所有的字符都被逐字发送,因为{enter}模拟了回车键。下面的将举例说明一些其它常用的特殊字符:
;Send, ^c!{tab}pasted:^v
;上面的例子将会发送Control+C(复制),然后是Alt+Tab(切换窗口),最后是发送字串“pasted:”并接上一个Control+V(粘贴)。

 

 

 

/*
REM 创建目录
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 跳转到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 恢复桌面默认图标
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\清理桌面图标\桌面图标备份\网上开票.url C:\Users\Public\Desktop\
xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面图标\桌面图标备份\网上开票.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\金蝶财务.lnk C:\Users\Public\Desktop\
xcopy /e /c /i /q /r /y D:\Personal\AutoRun\清理桌面图标\桌面图标备份\金蝶财务.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热键脚本语言文件
本脚本的最新版网址 http://www.cnblogs.com/delphichm
本脚本由delphi不断更新中,本脚本的部分内容来自于互联网搜索引擎

http://www.265.com
http://www.hao123.com/
http://www.so.com
http://www.baidu.com

可以借助Delphi等工具来实现更多的功能
本人可以在有空的时候免费无偿的回答一些有关ahk和delphi方面的问题
我的腾讯QQ聊天号码是 595076941 如果我不在线可能是隐身或没时间登录
在我离线时你仍然可以发送信息给我,等我有空时会回复信息的!
*/


/*
; 下面的例子移动一个文件夹内的所有文件和文件夹到一个不同的文件夹:
ErrorCount := MoveFilesAndFolders("D:\Personal\桌面\*.*", "D:\Personal\桌面备份\")


;If ErrorCount <> 0
;    MsgBox %ErrorCount% 个文件/文件夹不能被移动。


;MoveFilesAndFolders(SourcePattern, DestinationFolder, DoOverwrite = false)

MoveFilesAndFolders(SourcePattern, DestinationFolder, DoOverwrite = false)

; 移动所有匹配 SourcePattern 的文件和文件夹到名为 DestinationFolder 的文件夹
; 并返回不能被移动的文件/文件夹的数量。此函数需要 v1.0.38+
; 因为它使用了 FileMoveDir 的模式 2 。
{
FileCreateDir , %DestinationFolder%
If DoOverwrite = 1
DoOverwrite = 2 ; 请看 FileMoveDir 关于模式 2 对模式 1 的描述。
; 首先移动所有文件(而不是文件夹):
FileMove, %SourcePattern%, %DestinationFolder%, %DoOverwrite%
ErrorCount := ErrorLevel
; 现在移动所有的文件夹:
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 表示进程不存在
;由于可执行文件名有可能被用户修改所以
;     这里使用相对稳定的不大会更改的窗口标题是否存在来判断程序是否已经运行,防止重复运行
;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}

;操作完成,提示用户输入关键字
; MsgBox Please InputYour KeyWord to Search it

return  ;千万不要忘记 return 结束热键执行代码块定义

;文件: D:\Personal\AutoHotkey\MasterSeeker\MasterSeeker_MD5_0F7.exe
;大小: 989184 字节
;文件版本: 1.2.0.1
;修改时间: 2011年9月30日, 22:26:12
;MD5: 0F75BA8717362BD078487E567A4D8C16
;SHA1: 6DB1F9ABDEA4A7E9CF5612C6458A0817B5482988
;CRC32: 220755B3


*/

;=== AutoHotkey热键脚本语言文件 autoHotkey.ini 到此行结束 === The End Line Of autoHotkey.ini AutoHotkey ScriptFile =================

 


/*

 

;== AutoHotkey热键脚本语言文件 AutoHotkey.ini === AutoHotkey.ahk ==
; ---  按热键  `  打开本地磁盘文件搜索软件 MasterSeeker_1.2_by_DxCK  ----
; ---  快捷键  `  即 ~ 键,位于 Esc 退出键正下方,位于 Tab 制表键上方  ----
`::
; 第1步 , 判断可执行程序文件是否存在
IfNotExist,MasterSeeker\MasterSeeker.exe
{
MsgBox,文件 MasterSeeker\MasterSeeker.exe 不存在
return
}
; 第2步 , 如果程序未运行那么运行程序
IfWinNotExist, MasterSeeker 1.2 by DxCK
{
Run,MasterSeeker\MasterSeeker.exe,,max
}
; 第3步 , 激活窗口(把窗口放到前台,设置为顶层窗口)并最大化窗口
; 不知道是什么原因,窗口是否激活总是误判,这里只好啰嗦一点了
Loop,3
{
WinGetTitle, MyActiveWindowTitle, A
Sleep,50
while    ("%MyActiveWindowTitle%" <> "MasterSeeker 1.2 by DxCK" )
{
Sleep,50
while    ("%MyActiveWindowTitle%" <> "MasterSeeker 1.2 by DxCK" )
{

;调用激活窗口的子程序函数过程代码块
ToggleWinMinimize("MasterSeeker 1.2 by DxCK")
WinMaximize
WinGetTitle, MyActiveWindowTitle, A
Sleep,50
}
}
}

; 第4步 、 如果搜索输入框没有获得焦点那么选中搜索输入框
;可以通过窗口句柄窗口信息显示工具来取得并测试窗口的信息
;Spy++ Lite V2.4
;ViewWizard 2.8.0
;句柄精灵 3.0
;如果无法取得窗口的信息可以将 Control 参数为空或省略,目标窗口的顶端控件将被使用。
;然后通过 Send,{TAB} 跳转到目标控件
Sleep,10
ControlFocus,Filename ,MasterSeeker 1.2 by DxCK
Sleep,10
Send,{End}
Sleep,10
Send,+{home}
Sleep,10

;第5步、操作完成,提示用户输入关键字
; #Persistent
ToolTip, 请输入需要搜索的文件名,100,50
SetTimer, RemoveToolTip, 3000
return  ;千万不要忘记 return 结束热键执行代码块定义

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

;定义子程序过程函数代码模块
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
}

*/

转载于:https://www.cnblogs.com/delphichm/p/3668814.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值