Skip to content

Commit 73176c5

Browse files
authored
Merge pull request #3 from Checkumeito/main
Update AHK Script
2 parents 8af6efe + 6908250 commit 73176c5

File tree

1 file changed

+32
-25
lines changed

1 file changed

+32
-25
lines changed

AutoHotKey_Scripts/Checkmate_hotkeys.ahk

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ if !A_IsAdmin {
3434

3535
; TDP Adjuster & TDP Profiles
3636
; On Script Reload, TDP will default back to 15W
37-
38-
TrayTip, ,TDP set to 15W, 1, 0
39-
Sleep 1000
4037
HideTrayTip()
38+
TrayTip, ,TDP set to 15W, 1, 0
39+
SetTimer, HideTrayTip, -2000
4140
defaultSlowFast := 15000
4241
defaultStamp := 1500
4342
Run, *RunAs %ryzenadjPath% --stapm-limit=%defaultStamp% --slow-limit=%defaultSlowFast% --fast-limit=%defaultSlowFast%", hide
@@ -46,108 +45,116 @@ return
4645

4746
; Win + Numpad 4 ==> Set Default TDP to 15W
4847
#Numpad4::
49-
TrayTip, ,Set TDP to 15W, 1, 0
50-
Sleep 2000
5148
HideTrayTip()
49+
TrayTip, ,Set TDP to 15W, 1, 0
50+
SetTimer, HideTrayTip, -2000
5251
defaultSlowFast := 15000
5352
defaultStamp := 1500
5453
Run, *RunAs %ryzenadjPath% --stapm-limit=%defaultStamp% --slow-limit=%defaultSlowFast% --fast-limit=%defaultSlowFast%
54+
Sleep 200
5555
return
5656

5757
; Win + Numpad 5 ==> Increase TDP by 1W
5858
#Numpad5::
59+
HideTrayTip()
5960
CurrentTDP := Ceil(defaultSlowFast/1000)
6061
if (defaultSlowFast < 15000 or defaultStamp < 1500)
6162
{
6263
defaultSlowFast := % defaultSlowFast + 1000
6364
defaultStamp := % defaultStamp + 100
6465
CurrentTDP := Ceil(defaultSlowFast/1000)
6566
TrayTip, ,TDP increased by 1W. Current TDP: %CurrentTDP%W, 1, 0
66-
Sleep 2000
67-
HideTrayTip()
67+
SetTimer, HideTrayTip, -2000
6868
Run, *RunAs %ryzenadjPath% --stapm-limit=%defaultStamp% --slow-limit=%defaultSlowFast% --fast-limit=%defaultSlowFast%
6969
} else {
7070
TrayTip, ,TDP cannot exceed 15W. Current TDP: %CurrentTDP%W, 1, 3
71-
Sleep 3000
72-
HideTrayTip()
71+
SetTimer, HideTrayTip, -3000
7372
}
73+
Sleep 200
7474
return
7575

7676
; Win + Numpad 6 ==> Decrease TDP by 1W
7777
#Numpad6::
78+
HideTrayTip()
7879
CurrentTDP := Ceil(defaultSlowFast/1000)
7980
if (defaultSlowFast > 3000 or defaultStamp > 300)
8081
{
8182
defaultSlowFast := % defaultSlowFast - 1000
8283
defaultStamp := % defaultStamp - 100
8384
CurrentTDP := Ceil(defaultSlowFast/1000)
8485
TrayTip, ,TDP decreased by 1W. Current TDP: %CurrentTDP%W, 1, 0
85-
Sleep 2000
86-
HideTrayTip()
86+
SetTimer, HideTrayTip, -2000
8787
Run, *RunAs "%ryzenadjPath%" --stapm-limit=%defaultStamp% --slow-limit=%defaultSlowFast% --fast-limit=%defaultSlowFast%
8888
} else {
8989
TrayTip, ,TDP cannot be below 3W. Current TDP: %CurrentTDP%W, 1, 3
90-
Sleep 3000
91-
HideTrayTip()
90+
SetTimer, HideTrayTip, -3000
9291
}
92+
Sleep 200
9393
return
9494

9595
; Win + Numpad 7 ==> Read Current TDP
9696
#Numpad7::
97+
HideTrayTip()
9798
CurrentTDP := Ceil(defaultSlowFast/1000)
9899
TrayTip, ,Current TDP: %CurrentTDP%W, 1, 0
99-
Sleep 2000
100-
HideTrayTip()
100+
SetTimer, HideTrayTip, -3000
101+
Sleep 200
101102
return
102103

103-
; Win + Numpad 8 ==> Set Default TDP to 3W
104+
; Win + Numpad 8 ==> Set Default TDP to 5W
104105
#Numpad8::
105-
TrayTip, ,Set TDP to 5W, 1, 0
106-
Sleep 2000
107106
HideTrayTip()
107+
TrayTip, ,Set TDP to 5W, 1, 0
108+
SetTimer, HideTrayTip, -2000
108109
defaultSlowFast := 5000
109110
defaultStamp := 500
110111
Run, *RunAs "%ryzenadjPath%" --stapm-limit=%defaultStamp% --slow-limit=%defaultSlowFast% --fast-limit=%defaultSlowFast%
112+
Sleep 200
111113
return
112114

113115
; Win + Numpad 9 ==> Set Default TDP to 10W
114116
#Numpad9::
115-
TrayTip, ,Set TDP to 10W, 1, 0
116-
Sleep 2000
117117
HideTrayTip()
118+
TrayTip, ,Set TDP to 10W, 1, 0
119+
SetTimer, HideTrayTip, -2000
118120
defaultSlowFast := 10000
119121
defaultStamp := 1000
120122
Run, *RunAs "%ryzenadjPath%" --stapm-limit=%defaultStamp% --slow-limit=%defaultSlowFast% --fast-limit=%defaultSlowFast%
123+
Sleep 200
121124
return
122125

123126
; Changing Refresh rate
124127

125128
;Shift-Alt-1 change refresh rate to 40Hz
126129
+!1::
127-
TrayTip, ,Refresh Rate 40Hz, 1, 0
128-
Sleep 1000
129130
HideTrayTip()
131+
TrayTip, ,Refresh Rate 40Hz, 1, 0
132+
SetTimer, HideTrayTip, -2000
130133
Run, "%nircmdPath%" setdisplay monitor:0 1280 800 32 40
134+
Sleep 200
131135
return
132136

133137
;Shift-Alt-2 change refresh rate to 60Hz
134138
+!2::
135-
TrayTip, ,Refresh Rate 60Hz, 1, 0
136-
Sleep 1000
137139
HideTrayTip()
140+
TrayTip, ,Refresh Rate 60Hz, 1, 0
141+
SetTimer, HideTrayTip, -2000
138142
Run, "%nircmdPath%" setdisplay monitor:0 1280 800 32 60
143+
Sleep 200
139144
return
140145

141146
; Changing Brightness
142147

143148
;Shift-Alt-3 brightness up to 10
144149
+!3::
145150
Run, "%nircmdPath%" changebrightness -10
151+
Sleep 200
146152
return
147153

148154
;Shift-Alt-4 brightness down to 10
149155
+!4::
150156
Run, "%nircmdPath%" changebrightness 10
157+
Sleep 200
151158
return
152159

153160
;Remap Mouse Button Xbutton1 and Xbutton2:
@@ -187,4 +194,4 @@ HideTrayTip() {
187194
Sleep 50 ; It may be necessary to adjust this sleep.
188195
Menu Tray, Icon
189196
}
190-
}
197+
}

0 commit comments

Comments
 (0)