File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ # Requires AutoHotkey v2.0
2+ Persistent()
3+
4+ ; 初始化托盘菜单
5+ Tray := A_TrayMenu
6+ Tray.Delete ()
7+ Tray.Add(" 禁用脚本" , ToggleScript)
8+ Tray.Add()
9+ Tray.Add(" 关于" , ShowAbout)
10+ Tray.Add(" 退出" , ExitScript)
11+ Tray.Default := " 禁用脚本"
12+
13+ IsScriptEnabled := true
14+
15+ !^f :: {
16+ if (IsScriptEnabled)
17+ try WinSetStyle(" +0xC00000" , " A" )
18+ }
19+
20+ !^h :: {
21+ if (IsScriptEnabled)
22+ try WinSetStyle(" -0xC00000" , " A" )
23+ }
24+
25+ ToggleScript (* ) {
26+ global IsScriptEnabled
27+ IsScriptEnabled := ! IsScriptEnabled
28+ Tray.ToggleCheck(" 禁用脚本" )
29+ iconFile := IsScriptEnabled ? " shell32.dll, 110" : " shell32.dll, 131"
30+ }
31+
32+ ShowAbout (* ) {
33+ MsgBox (
34+ " 无边框窗口控制`n"
35+ " ---------------------------------`n"
36+ " `t功能说明:`n"
37+ " Alt+Ctrl+F = 显示标题栏`n"
38+ " Alt+Ctrl+H = 隐藏标题栏`n"
39+ " ---------------------------------`n"
40+ " 版本:v1.0`n"
41+ " 作者:Little-data`n"
42+ " GitHub:https://github.com/Little-Data/showtitlebar-v2`n"
43+ " 原作者:WindowsTime`n" ,
44+ " 关于 无边框窗口控制" ,
45+ " Iconi"
46+ )
47+ }
48+
49+ ExitScript (* ) {
50+ ExitApp
51+ }
You can’t perform that action at this time.
0 commit comments