`
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ
; 指定 SoundVolumeView 的路径
global SoundVolumeViewPath, devices, currentIndex, command
SoundVolumeViewPath := "D:\ahk1.0\Lib\soundvolumeview-x64\SoundVolumeView.exe"
; 定义设备名称(确保这些设备名称与 SoundVolumeView 中显示的名称完全匹配)
devices := ["耳机", "扬声器", "手机"]
currentIndex := 0 ; 当前设备的索引
appskey & F1::
currentIndex := (currentIndex + 1) > devices.MaxIndex() ? 1 : currentIndex + 1 ; 循环切换
; 拼接命令
command := SoundVolumeViewPath . " /SetDefault """ . devices[currentIndex] . """ ""Render"""

	; 调试:显示生成的命令,检查是否正确

{
loop, 1
SoundBeep, 400, 10
; 400 声音频率, 可以为表达式. 它是介于 37-32767 之间的数字. 省略则频率为523
; -------------------10 声音的持续时间, 单位为毫秒. 如果省略, 则持续时间为 150
; 显示当前设备名称
Text := "⭕ " . devices[currentIndex] . " ⭕"
btt(Text, 600, 10, ,"Style7")
sleep, 500
btt()
}
Run, %command% ; ----------------------执行命令
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 切换音频设备 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 1-28

OnClipboardChange:
{
SoundBeep, 10000, 1
btt(Clipboard,,,,"Style8")
sleep, 700
btt()​
;FileAppend, %clipboard% `n, c:\6 ;---------------- 剪贴板历史记录保存
return
}
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 复制后通知 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 02-68

~LButton & RButton::
cos_mousedrag_treshold := 2 ; pixels
MouseGetPos, cos_mousedrag_x, cos_mousedrag_y
win1 := WinActive("A")
KeyWait RButton
MouseGetPos, cos_mousedrag_x2, cos_mousedrag_y2
win2 := WinActive("A")
WinGetClass cos_class, A
if(((abs(cos_mousedrag_x2 - cos_mousedrag_x) > cos_mousedrag_treshold
or abs(cos_mousedrag_y2 - cos_mousedrag_y) > cos_mousedrag_treshold)) and win1 = win2
and cos_class != "ConsoleWindowClass")
KeyWait, RButton , T1.1
If ErrorLevel = 0
{
SendInput {Ctrl Down}c{Ctrl Up}
ClipWait, , 1
; 等待,一直到剪贴板包含数据。ClipWait, , 1
; 参数 2 将等待不超过2秒的时间. 0 等同于指定 0.5 如果省略, 此命令将无限期等待.
; 参数 1 会等待剪贴板中出现任何类型的数据. 省略此参数, 此命令会等待剪贴板中出现文本或文件.
}
Else
reload
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 左键拖选 右键确认 复制 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 2-53

MButton::
KeyWait, MButton, T0.5

If ErrorLevel = 1

{
SendInput {Ctrl Down}x{Ctrl Up}
}
Else
{
SendInput {Ctrl Down}v{Ctrl Up}
}
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 中键 长按剪切 点击粘贴 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 3-67

Rctrl::
loop,1
SoundBeep, 9000, 20
Send #{Space}
keywait, space
;-----------------------------------------------------------------------------------
V++
M := mod(V,2) ;; 模數
if M=1
SetDefaultKeyboard(0x0404) ;; 切換為中文輸入
else
SetDefaultKeyboard(0x0409) ;; 切換為英文輸入
return

SetDefaultKeyboard(LocaleID)
{
Global SPI_SETDEFAULTINPUTLANG := 0x005A
SPIF_SENDWININICHANGE := 2
Lan := DllCall("LoadKeyboardLayout", "Str", Format("{:08x}", LocaleID), "Int", 0)
VarSetCapacity(Lan%LocaleID%, 4, 0)
NumPut(LocaleID, Lan%LocaleID%)
;Lan := 0xE0090404
DllCall("SystemParametersInfo", "UInt", SPI_SETDEFAULTINPUTLANG, "UInt", 0, "UPtr", &Lan%LocaleID%, "UInt", SPIF_SENDWININICHANGE)
WinGet, windows, List
Loop %windows%
{
PostMessage 0x50, 0, %Lan%, , % "ahk_id " windows%A_Index%
}
}
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 切换中英输入法 Rctrl ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 4-75

Ralt::
if (A_PriorHotkey <> "Ralt" or A_TimeSincePriorHotkey > 400)
{
; 两次按下时间间隔太长, 所以这不是一个两次按下.
KeyWait, Ralt
return
}
{
loop,3
SoundBeep, 4000, 50
}
{
Text=全半角
btt(Text,300,400,,"Style5")
sleep, 600
btt()​
send, +{space}
return
}
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 全半角 双击 Ralt ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 5-96

Appskey::
t:=-oldt+(oldt:=A_TickCount)
if (t<100 || t>300)
Return
else oldt:=0
{
loop,3
SoundBeep, 3000, 30
Text=中英标点
btt(Text,,,,"Style6")
sleep, 600
btt()​
send, ^.
Return
}
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 中英标点 双击 Appskey ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 6-113

Volume_Up::TuneVolume("+")
Volume_Down::TuneVolume("-")
TuneVolume(UpDown)
{
static VolumeDivide := 20, VolumePercent, VolPercentB1, VolPercentB2, VolPercentB3, VolPercentB4, Prefix := ""
SoundGet, CurrentVolume
CurrentVolume += 0.1, StepAmount := Ceil(CurrentVolume / VolumeDivide)
SoundSet, % UpDown StepAmount
SetTimer, DestroyBvcGui, -880
SoundGet, CurrentVolume
IfWinExist, BetterVolumeControl
{
GuiControl, bvc:-Redraw, VolPercentB1
GuiControl, bvc:-Redraw, VolPercentB2
GuiControl, bvc:-Redraw, VolPercentB3
GuiControl, bvc:-Redraw, VolPercentB4
GuiControl, bvc:-Redraw, VolumePercent
GuiControl, bvc:Text, VolPercentB1, % Prefix Round(CurrentVolume, 0)
GuiControl, bvc:Text, VolPercentB2, % Prefix Round(CurrentVolume, 0)
GuiControl, bvc:Text, VolPercentB3, % Prefix Round(CurrentVolume, 0)
GuiControl, bvc:Text, VolPercentB4, % Prefix Round(CurrentVolume, 0)
GuiControl, bvc:Text, VolumePercent, % Prefix Round(CurrentVolume, 0)
GuiControl, bvc:+Redraw, VolPercentB1
GuiControl, bvc:+Redraw, VolPercentB2
GuiControl, bvc:+Redraw, VolPercentB3
GuiControl, bvc:+Redraw, VolPercentB4
GuiControl, bvc:+Redraw, VolumePercent
}
Else
{
Gui, bvc:New, +LastFound +AlwaysOnTop -Border -Caption +ToolWindow +E0x20
Gui, Font, s50
Gui, Color, c000001
Gui, Add, Text, x5 y5 c21e6c1 BackgroundTrans vVolumePercent, %Prefix%100
GuiControl, Text, VolumePercent, % Prefix Round(CurrentVolume, 0)
WinSet, TransColor, c000001
Gui, Show, NA x670 y380, BetterVolumeControl
}
}
DestroyBvcGui()
{
Gui, bvc:Destroy
}
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 音 量 指 示 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 7-159

;🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫 开始 位置 🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫

+#d::
send, {F2}^c
Run, "D:\ahk1.0\Lib\0 tool\bat\新建5覆盖不提示.vbs"
sleep,2000

b64Decode(string)
{
if !(DllCall("crypt32\CryptStringToBinary", "ptr", &string, "uint", 0, "uint", 0x1, "ptr", 0, "uint*", size, "ptr", 0, "ptr", 0))
throw Exception("CryptStringToBinary failed", -1)
VarSetCapacity(buf, size, 0)
if !(DllCall("crypt32\CryptStringToBinary", "ptr", &string, "uint", 0, "uint", 0x1, "ptr", &buf, "uint*", size, "ptr", 0, "ptr", 0))
throw Exception("CryptStringToBinary failed", -1)
return StrGet(&buf, size, "UTF-8")
}
FileAppend, % b64decode( clipboard ) , c:\5
sleep, 1000
Run, nircmd.exe clipboard readfile "c:\5"
;MsgBox,4 ,F4+d F4+V , ;% b64decode( clipboard ), 2
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ base64解码到剪贴板 +#d ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 8-182

+#f::
send, {F2}^c
Run, "D:\ahk1.0\Lib\0 tool\bat\新建5覆盖不提示.vbs"
sleep,2000

b64Encode(string)
{
VarSetCapacity(bin, StrPut(string, "UTF-8")) && len := StrPut(string, &bin, "UTF-8") - 1
if !(DllCall("crypt32\CryptBinaryToString", "ptr", &bin, "uint", len, "uint", 0x1, "ptr", 0, "uint*", size))
throw Exception("CryptBinaryToString failed", -1)
VarSetCapacity(buf, size << 1, 0)
if !(DllCall("crypt32\CryptBinaryToString", "ptr", &bin, "uint", len, "uint", 0x1, "ptr", &buf, "uint*", size))
throw Exception("CryptBinaryToString failed", -1)
return StrGet(&buf)
}
FileAppend, % b64encode( clipboard ) , c:\5
sleep, 1000
Run, nircmd.exe clipboard readfile "c:\5"
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ base64编码到剪贴板 +#f ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 9-203
#Persistent
#SingleInstance force
KillTip() ;清除toolTip
{
toolTip
}
volUp() ;增加""
{
sendInput {Volume_Up}
SoundGet, master_volume
master_volume := ceil(master_volume)
;ToolTip %master_volume% `%
;SetTimer, killTip, -500
}

volDown() ;降低音量
{
sendInput {Volume_Down}
SoundGet, master_volume
master_volume := ceil(master_volume)
;ToolTip %master_volume% `%
;SetTimer, killTip, -500
}

volMute() ;静音切换
{
sendInput {Volume_Mute}
SoundGet, master_volume
master_volume := ceil(master_volume)
; toolTip %master_volume% `%
;SetTimer,killTip, -500
}
F5 & F1:: volMute()
F5 & F2:: volDown()
F5 & F3:: volUp()
#If GetKeyState("LButton", "P") ; 按住右键 再左键静音 再滚轮调
;RButton::volMute()
;WheelDown::volDown()
;WheelUp::volUp()
#If
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ F5 & F3 增大 F2 减小 F1 静音 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 10-245

F1 & F2::
clipboard :=""
移动到 = D:\B
send ^c
clipwait,2
选中文件 :=clipboard
if (选中文件)

Loop, parse, clipboard, n, r

{
RegExMatch(A_LoopField,".\(.+?..)$",文件名)
RegExMatch(A_LoopField,"(.\).+?..$",原始路径)
;文件存在检测 :=% 原始路径1 "B" 文件名1
if (FileExist(文件存在检测2), "D")
{

            }

else
{
FileMove, %A_LoopField%, % 移动到
}
}
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ F1 & F2 选中文件移动至D:\B ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 11-271
;sc058::
#esc::
send, !j#+{esc}
sleep, 9000
send, !u
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ #esc 关闭Vpn Ocr 再打开Vpn ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 11-272

^F9::
clipboard := "" ; 清空剪贴板
Send, ^c ; 复制选中的文本到剪贴板
ClipWait ; 等待剪贴板中有数据
urls := clipboard ; 将剪贴板内容存储到变量中

; 创建一个临时批处理文件
FileDelete, ping_commands.bat  ; 删除旧的文件(如果存在)
FileAppend, @echo off`n, ping_commands.bat  ; 创建新的批处理文件并添加开头

Loop, parse, urls, `n  ; 遍历每一行(网址)
{
    FileAppend, ping %A_LoopField%`n, ping_commands.bat  ; 将每个 ping 命令写入批处理文件
}

Run, cmd.exe /k ping_commands.bat  ; 在一个窗口中运行批处理文件

return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ ^F9 ping选定多个网址 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 012-516

^F10::
clipboard =
send, ^c
clipboard = %clipboard%
Sleep, 100 ; 等待剪切操作完成
ClipWait ; 等待剪贴板中有数据
Run, %A_ComSpec% /k %clipboard%
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ ^F10 cmd/k 选定文字 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 012-516

^F11::
clipboard =
send, ^c
clipboard = %clipboard%
Sleep, 100 ; 等待剪切操作完成
ClipWait ; 等待剪贴板中有数据
Run, %A_ComSpec% /k %clipboard%, , RunAs
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ ^F11 cmd/k 选定文字 以管理员运行 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 012-516

^F12::
Send, >^x
Sleep, 100 ; 等待剪切操作完成
; 获取剪贴板内容(假设剪贴板中存储的是批处理文件的路径)
ClipWait ; 等待剪贴板内容
batchFilePath := Clipboard ; 将剪贴板内容赋值给变量

; 确保路径是有效的
if FileExist(batchFilePath) {
    ; 使用 RunAs 命令以管理员身份运行批处理文件
    Run, % "cmd.exe /c """ batchFilePath """", , RunAs
} else {
    MsgBox, 批处理文件不存在: %batchFilePath%
}

return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ ^F12 cmd/c 选定文件 管理员运行 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 012-517

^+F12::
Send, >^x ; 获取批处理文件的路径快捷键
Sleep, 100 ; 等待剪切操作完成
; 获取剪贴板内容(假设剪贴板中存储的是批处理文件的路径)
ClipWait ; 等待剪贴板内容
batchFilePath := Clipboard ; 将剪贴板内容赋值给变量

; 确保路径是有效的
if FileExist(batchFilePath) {
    ; 非管理员身份 运行批处理文件
    Run, % "cmd.exe /c """ batchFilePath """"
} else {
    MsgBox, 批处理文件不存在: %batchFilePath%
}

return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ ^F12 cmd/c 选定文件 管理员运行 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 012-517

F5 & m::
run "D:\ahk1.0\Lib\0 tool\9金山截图王\kscrcap.exe"
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ F5 & m 截图 OCR ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 012-518

!F1::
time = %A_Hour%时 %A_Min%分
Speak(" " . time)
s:=A_MM "月" A_DD "日 星期" SubStr("日一二三四五六",A_WDay,1)
Speak("" . s)
return
Speak(say) {
spovice:=ComObjCreate("sapi.spvoice")
spovice.Speak(say)
}
return
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ !F1 报时 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 00015-1067

#If ( WinActive("ahk_exe explorer.exe"))
#SingleInstance Force
#n::
send, <!{right}
return
#b::
send, <!{left}
return
#IfWinActive
;-----------------------------------------------------------------------------------
#If ( WinActive("ahk_exe chrome.exe") or WinActive("ahk_exe PDFXEdit.exe"))
#SingleInstance Force
#n::
send, <^+{tab}
return
#b::
send, <^{tab}
return
#IfWinActive
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ #n前 #b后 资源管理器 浏览器 PDFXEdit ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 00015-1067

#Persistent
Rctrl & 6::
KeyWait, Rctrl, D ; 确保释放 Rctrl 键后再执行操作

; 检查 Adventure.exe 是否已存在
IfWinNotExist, ahk_exe Adventure.exe
{
    Run "D:\ahk1.0\Lib\0 tool\Adventure\Adventure.exe"
    WinWait, ahk_exe Adventure.exe, , 5  ; 最多等待 5 秒
}
Else IfWinNotActive, ahk_exe Adventure.exe
{
    WinActivate  ; 激活窗口
}
Else
{
    ; 检查窗口是否已最小化
    IfWinExist, ahk_exe Adventure.exe
    {
        WinGet, MinimizedState, MinMax, ahk_exe Adventure.exe
        if (MinimizedState = -1)  ; 如果窗口已最小化
            WinRestore  ; 还原窗口
        else
            WinMinimize  ; 否则最小化窗口
    }
}

Return

;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ Rctrl & 6 Adventure ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 00015-1067

;🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫 最后 位置 🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫🎫

#Persistent
显示时间(k="")
{
static oldtime, oldx, oldy, myid, open, init:=显示时间("Start")
if (k="Start")
{
SetTimer, 显示时间, 500
return
}
;nowtime:= "" A_MM "⋆"A_DD " " A_DDD " " A_Hour ":" A_Min ":" A_Sec " " ;-------- 加上秒
nowtime:= "" A_Hour ":" A_Min ":" A_Sec "" ;-------- 加上秒
if (nowtime!=oldtime)
{
oldtime:=nowtime
Gui, ShowTime: +LastFoundExist
IfWinNotExist
{
Gui, ShowTime: +LastFound -Caption +ToolWindow +Hwndmyid
Gui, ShowTime: Margin, 0, 0 ; 边距
Gui, ShowTime: Color, 0x1C1C1C ; 设置 GUI 的背景颜色为白色,可以尝试其他颜色
WinSet, TransColor, 1C1C1C ; 设置白色为透明颜色

  ;Gui, ShowTime: Font, s12 w1000 cd7003a              ;字体 大小16 加粗  颜色FF2292
  ;Gui, ShowTime: Add, Text, w170 Left                  ;背景宽度
  ;Gui, ShowTime: Show, x6 y862 NA, ShowTime    ;位置
  Gui, ShowTime: Font, s12 w1000 cd7003a              ;字体 大小16 加粗  颜色FF2292
  Gui, ShowTime: Add, Text, w72 Left                  ;背景宽度
  Gui, ShowTime: Show, x0 y0 NA, ShowTime    ;位置
  WinSet, TransColor, red
  

}
ControlSetText,, %nowtime%

}
MouseGetPos, x, y, id
if (id=myid)
{
if (x!=oldx or y!=oldy)
{
oldx:=x, oldy:=y

#NoEnv
OnMessage(0x201, "WM_LBUTTONDOWN")

Global tClass:="SysShadow,Alternate Owner,tooltips_class32,DummyDWMListenerWindow,EdgeUiInputTopWndClass,ApplicationFrameWindow,TaskManagerWindow,Qt5QWindowIcon,Windows.UI.Core.CoreWindow,WorkerW,Progman,Internet Explorer_Hidden,Shell_TrayWnd" ; HH Parent

WinGetActiveTitle, aWin

  s:=A_YYYY "年" A_MM "月" A_DD "日 星期" SubStr("日一二三四五六",A_WDay,1)
  ToolTip, `n  %s%`n`n  鼠标右键按住打开目录  `n`t

tooltip,
}
if (!open) and GetKeyState("RButton","P")
{
open:=0.01 ;------------------------------------- 右键按0.01秒
;Run, % A_IsCompiled ? A_ScriptDir : RegExReplace(A_AhkPath,"\[^\\]+$")
Run D:\ahk1.0 ;---------------------------------------------------------------- 运行?
}
}
else
{
;-- 防止其他窗口争抢最前端显示
WinSet, AlwaysOnTop, On, ahk_id %myid%
ToolTip
open:=0
}
}
return

WM_LBUTTONDOWN(wParam, lParam, msg, hwnd) {
PostMessage, 0xA1, 2 ; WM_NCLBUTTONDOWN
KeyWait, LButton, U
Loop {
hwnd := Format("0x{:x}", DllCall("GetWindow", UPtr,hwnd, UInt,2) ) ; 2 = GW_HWNDNEXT
if DllCall("IsWindowVisible", UPtr,hwnd) {
WinGet, Ex, ExStyle, ahk_id %hwnd%
;if ( IsWindowCloaked(hwnd) || Ex & (0x8 | 0x80 | 0x8000000) ) ;WS_EX_TOPMOST, WS_EX_TOOLWINDOW, WS_EX_NOACTIVATE
if (IsWindowCloaked(hwnd) || Ex & 0x8000088) ;WS_EX_TOPMOST, WS_EX_TOOLWINDOW, WS_EX_NOACTIVATE
Continue
WinGetClass, cClass, ahk_id %hwnd%
if InStr(tClass, cClass, 1) ; if cClass in %tClass%
Continue
else break
}
} WinActivate, ahk_id %hwnd%
}

IsWindowCloaked(hwnd) {
return DllCall("dwmapi\DwmGetWindowAttribute", "ptr",hwnd, "int",14, "int*",cloaked, "int",4) >= 0
&& cloaked
}
return
;Esc::exitapp
;ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 右键在时间上按0.1秒后 打开脚本目录 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 12-373

#IfWinActive ahk_class TTOTAL_CMD
AppsKey & F2::

#IfWinActive ahk_class CabinetWClass
AppsKey & F2::
#IfWinActive ahk_class ExploreWClass
AppsKey & F2::
#IfWinActive ahk_class Progman
AppsKey & F2::
#IfWinActive ahk_class WorkerW
AppsKey & F2::
WinGet, hWnd, ID, A
WinGetClass, vWinClass, % "ahk_id " hWnd
vPath := "", vIsDir := 0

if (vWinClass = "TTOTAL_CMD")

{
MsgBox "Tc"
}
if (vWinClass = "CabinetWClass") || (vWinClass = "ExploreWClass")
{
for oWin in ComObjCreate("Shell.Application").Windows
{
if (oWin.HWND = hWnd)
{
vIsDir := oWin.Document.FocusedItem.IsFolder
vPath := oWin.Document.FocusedItem.Path
break
}
}
oWin := ""
}
else if (vWinClass = "Progman") || (vWinClass = "WorkerW")
{
VarSetCapacity(hWnd, 4, 0)
;SWC_DESKTOP := 0x8 ;VT_BYREF := 0x4000 ;VT_I4 := 0x3 ;SWFO_NEEDDISPATCH := 0x1
oWin := ComObjCreate("Shell.Application").Windows.FindWindowSW(0, "", 8, ComObject(0x4003, &hWnd), 1)
vIsDir := oWin.Document.FocusedItem.IsFolder
vPath := oWin.Document.FocusedItem.Path
oWin := ""
}

if (vPath = "")
{
MsgBox, % "error: file not found"
return
}
else if !FileExist(vPath)
{
MsgBox, % "error: file not found:rn" vPath
return
}
else if vIsDir
{
Run, % Chr(34) vPath Chr(34)
return
}
FileGetSize, vSizeMB, % vPath, M
if (vSizeMB > 6)
{
MsgBox, % "error: file too big: " vSizeMB " MB"
return
}
SplitPath, vPath, vName, vDir, vExt, vNameNoExt, vDrive
FileGetSize, vSizeMB, % vPath, M
if (vExt = "lnk")
FileGetShortcut, % vPath, vPath
if vExt in bat,ahk,reg,txt,htm,html,mht,cpp,h,m3u,mpcpl,url,clp,ini,cfg,csv,srt,log,js,xml,toml,json,css,vbs,md,dat,ah2,conf,yml,toml,pub
Run, "D:\ahk1.0\Lib\0 tool\EmEditor\EmEditor.exe" "%vPath%"
else if vExt in bmp,gif,jpe,jpeg,jpg,png,ico
Run, "c:\3\iview460_x64\i_view64.exe" "%vPath%"
else if vExt in md
Run, "c:\3\Typora0.9.98\Typora.exe" "%vPath%"
Return
;ΞΞΞΞΞΞΞΞΞΞΞΞ AppsKey & F2 选中图标 用 EmEditor 打开 ΞΞΞΞΞΞΞΞΞΞΞΞΞΞ 13-448

/*
切换音频设备 1-28
左键拖选 右键确认 复制 2-53
中键 长按剪切 点击粘贴 3-67
Rctrl 切换中英输入法 4-75
Ralt 全半角 双击 5-96
Appskey 中英标点 双击 6-113
音 量 指 示 7-159
+#d base64解码到剪贴板 8-182
+#f base64编码到剪贴板 9-203
F5 & F3 增大 F2 减小 F1 静音 10-245
F1 & F2 选中文件移动至D:\B 11-271
右键在时间上按0.1秒后 打开脚本目录 12-373
AppsKey & F2 选中图标 用 EmEditor 打开 13-448
*/
`

转载请注明出处