-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautohotkey
119 lines (104 loc) · 2.42 KB
/
autohotkey
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
; 鼠标事件 -----------------------------------------------
#h::LButton
#w::send {WheelUp}
#s::send {WheelDown}
; 快捷键修改 ---------------------------------------------
; 键盘键位替换,如 上下左右 删除 全选
<!i::send {Up}
<!k::send {Down}
<!j::send {Left}
<!l::send {Right}
<!u::send {Backspace}
<!a::send ^a
; 让 window 快捷键 更像 mac
<!c::send ^c
<!v::send ^v
<!s::send ^s
<!x::send ^x
<!z::send ^z
<!d::send ^d
<!f::send ^f
; 快速选择
+!i::send +{up}
+!j::send +{left}
+!l::send +{right}
+!k::send +{down}
+!;::send +{end}
+!h::send +{home}
; win10桌面切换 win+j,k 代表左右 ,win+3主要是打开 chrome 的 调试工具的选择器
#j::send ^#{right}
#k::send ^#{left}
#1::send {F11}
#2::send {F12}
#3::
send {F12}
send ^+c
return
#x::send !{F4}
#d::WinMinimizeAll
; 程序运行快捷键 ---------------------------------------------------------
!g::
Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Return
; 窗口置顶,半透明 -----------------------------------------------
>Shift::
if (A_PriorHotKey = ">Shift" AND A_TimeSincePriorHotKey < 500)
{
WinGet ow, id, A
WinTopToggle(ow)
}
return
#0::
!0::
WinGet ow, id, A
WinTopToggle(ow)
return
WinTopToggle(w) {
WinGetTitle, oTitle, ahk_id %w%
Winset, AlwaysOnTop, Toggle, ahk_id %w%
WinGet, ExStyle, ExStyle, ahk_id %w%
if (ExStyle & 0x8) ; 0x8 为 WS_EX_TOPMOST.在WinGet的帮助中
oTop = Ture
else
oTop = False
tooltip %oTitle% %oTop%
SetTimer, RemoveToolTip,1000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
}
#=::
!=:: ;; alt-=
WinGet, ow, id, A
WinTransplus(ow)
return
#-::
!-:: ;; alt--
WinGet, ow, id, A
WinTransMinus(ow)
return
;; WinTransplus WinTransMinus 对ahk_id为w的窗口
;; 进行透明度增减,每次幅度为10
WinTransplus(w){
WinGet, transparent, Transparent, ahk_id %w%
if transparent < 255
transparent := transparent+10
else
transparent =
if transparent
WinSet, Transparent, %transparent%, ahk_id %w%
else
WinSet, Transparent, off, ahk_id %w%
return
}
WinTransMinus(w){
WinGet, transparent, Transparent, ahk_id %w%
if transparent
transparent := transparent-10
else
transparent := 240
WinSet, Transparent, %transparent%, ahk_id %w%
return
}