1 Star 5 Fork 3

xcatp/ahk-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.ahk 2.36 KB
一键复制 编辑 原始数据 按行查看 历史
xcatp 提交于 2025-05-31 19:55 +08:00 . 导入外部脚本
#Requires AutoHotkey v2.0
#SingleInstance Force
#Include _lib\Extend.ahk
#Include _lib\Tip.ahk
#Include _lib\HotStringEx.ahk
#Include _lib\log.ahk
#Include _lib\AhkCmdLine.ahk
#Include _lib\Fs.ahk
#Include _lib\Path.ahk
#Hotstring EndChars `t `n.';/
TraySetIcon "./Meow.ico"
#Include lightCtrl.ahk
#Include mediaCtrl.ahk
#Include quickLook.ahk
#Include simpleMove.ahk
#Include volumeCtrl.ahk
#Include blockMouse.ahk
#Include windowTopCtrl.ahk
#Include setDesktopIconState.ahk
#Include schedule\index.ahk
CoordMode "ToolTip", "Screen"
CoordMode "Pixel", "Screen"
CoordMode "Mouse", "Screen"
tray := A_TrayMenu
tray.delete()
, tray.add('Folder', (*) => Run(A_ScriptDir))
sm := Menu()
tray.add('use', sm)
, tray.add()
, tray.Add('Pause', (*) => Suspend())
, tray.add('Reload', (*) => Reload())
, tray.add('Exit', (*) => ExitApp())
, tray.Default := 'Pause'
fList := []
GetList(dir) {
loop files dir '/*.*', 'FD' {
if fs.IsDir(A_LoopFilePath) {
if fs.IsHidden(A_LoopFilePath) or A_LoopFileName[1] = '_'
continue
else GetList(A_LoopFilePath)
} else {
p := Path.Parse(A_LoopFileFullPath)
if p.ext != 'ahk' or p.name[1] = '_' or p.name[1] = '.'
continue
fList.Push([p.nameNoExt, A_LoopFileFullPath])
}
}
}
GetList('./scripts')
fList.foreach(v => sm.Add(v[1], (*) => Run(v[2])))
$LAlt:: {
if A_PriorHotkey = A_ThisHotkey && A_TimeSincePriorHotkey < 5
return
Send('{LAlt Down}'), KeyWait('LAlt'), Send('{LAlt Up}')
}
main_actions := [
['Date', (*) => SendInput(FormatTime(, "yyyy/MM/dd"))],
['Time', (*) => SendInput(FormatTime(, "HH:mm:ss"))]
]
hse := HotStringEx('~;', 1)
hse.Register(main_actions*)
::;datetime:: {
SendInput(FormatTime(, "yyyy/MM/dd_HH:mm:ss/tt"))
}
>!LButton:: {
CoordMode "Mouse", "Screen"
MouseGetPos(&px, &py), WinGetPos(&wx, &wy, , , 'A')
dx := wx - px, dy := wy - py
SetWinDelay -1
While GetKeyState("LButton", "P")
MouseGetPos(&nx, &ny), WinMove(nx + dx, ny + dy, , , "A")
if (A_ThisHotkey = A_PriorHotkey && A_TimeSincePriorHotkey < 300)
try WinMaximize('A')
}
logger := Log('.\_log.txt')
; logger.silent := true
if InStr(ParseCmdLine(GetCommandLine()).switches.Join(), '/restart')
logger.Info('RESTART')
else {
logger.Info('Script Start')
OnExit((*) => logger.Info('Script Exit'))
}
<+<!q:: Run('.\scripts\_windowTransparentCtrl.ahk')
#Include G:\AHK\_SELF\meow.ahk
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dkwd/ahk-scripts.git
git@gitee.com:dkwd/ahk-scripts.git
dkwd
ahk-scripts
ahk-scripts
master

搜索帮助