@@ -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
4037HideTrayTip()
38+ TrayTip , ,TDP set to 15W, 1 , 0
39+ SetTimer , HideTrayTip, - 2000
4140defaultSlowFast := 15000
4241defaultStamp := 1500
4342Run , * 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
5148HideTrayTip()
49+ TrayTip , ,Set TDP to 15W, 1 , 0
50+ SetTimer , HideTrayTip, - 2000
5251defaultSlowFast := 15000
5352defaultStamp := 1500
5453Run , * RunAs %ryzenadjPath% -- stapm- limit =%defaultStamp% -- slow- limit =%defaultSlowFast% -- fast- limit =%defaultSlowFast%
54+ Sleep 200
5555return
5656
5757; Win + Numpad 5 ==> Increase TDP by 1W
5858#Numpad5 ::
59+ HideTrayTip()
5960CurrentTDP := Ceil (defaultSlowFast/ 1000 )
6061if (defaultSlowFast < 15000 or defaultStamp < 1500 )
6162{
6263defaultSlowFast := % defaultSlowFast + 1000
6364defaultStamp := % defaultStamp + 100
6465CurrentTDP := Ceil (defaultSlowFast/ 1000 )
6566TrayTip , ,TDP increased by 1W. Current TDP: %CurrentTDP%W, 1 , 0
66- Sleep 2000
67- HideTrayTip()
67+ SetTimer , HideTrayTip, - 2000
6868Run , * RunAs %ryzenadjPath% -- stapm- limit =%defaultStamp% -- slow- limit =%defaultSlowFast% -- fast- limit =%defaultSlowFast%
6969} else {
7070TrayTip , ,TDP cannot exceed 15W. Current TDP: %CurrentTDP%W, 1 , 3
71- Sleep 3000
72- HideTrayTip()
71+ SetTimer , HideTrayTip, - 3000
7372}
73+ Sleep 200
7474return
7575
7676; Win + Numpad 6 ==> Decrease TDP by 1W
7777#Numpad6 ::
78+ HideTrayTip()
7879CurrentTDP := Ceil (defaultSlowFast/ 1000 )
7980if (defaultSlowFast > 3000 or defaultStamp > 300 )
8081{
8182defaultSlowFast := % defaultSlowFast - 1000
8283defaultStamp := % defaultStamp - 100
8384CurrentTDP := Ceil (defaultSlowFast/ 1000 )
8485TrayTip , ,TDP decreased by 1W. Current TDP: %CurrentTDP%W, 1 , 0
85- Sleep 2000
86- HideTrayTip()
86+ SetTimer , HideTrayTip, - 2000
8787Run , * RunAs " %ryzenadjPath%" -- stapm- limit =%defaultStamp% -- slow- limit =%defaultSlowFast% -- fast- limit =%defaultSlowFast%
8888} else {
8989TrayTip , ,TDP cannot be below 3W. Current TDP: %CurrentTDP%W, 1 , 3
90- Sleep 3000
91- HideTrayTip()
90+ SetTimer , HideTrayTip, - 3000
9291}
92+ Sleep 200
9393return
9494
9595; Win + Numpad 7 ==> Read Current TDP
9696#Numpad7 ::
97+ HideTrayTip()
9798CurrentTDP := Ceil (defaultSlowFast/ 1000 )
9899TrayTip , ,Current TDP: %CurrentTDP%W, 1 , 0
99- Sleep 2000
100- HideTrayTip()
100+ SetTimer , HideTrayTip, - 3000
101+ Sleep 200
101102return
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
107106HideTrayTip()
107+ TrayTip , ,Set TDP to 5W, 1 , 0
108+ SetTimer , HideTrayTip, - 2000
108109defaultSlowFast := 5000
109110defaultStamp := 500
110111Run , * RunAs " %ryzenadjPath%" -- stapm- limit =%defaultStamp% -- slow- limit =%defaultSlowFast% -- fast- limit =%defaultSlowFast%
112+ Sleep 200
111113return
112114
113115; Win + Numpad 9 ==> Set Default TDP to 10W
114116#Numpad9 ::
115- TrayTip , ,Set TDP to 10W, 1 , 0
116- Sleep 2000
117117HideTrayTip()
118+ TrayTip , ,Set TDP to 10W, 1 , 0
119+ SetTimer , HideTrayTip, - 2000
118120defaultSlowFast := 10000
119121defaultStamp := 1000
120122Run , * RunAs " %ryzenadjPath%" -- stapm- limit =%defaultStamp% -- slow- limit =%defaultSlowFast% -- fast- limit =%defaultSlowFast%
123+ Sleep 200
121124return
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
129130HideTrayTip()
131+ TrayTip , ,Refresh Rate 40Hz, 1 , 0
132+ SetTimer , HideTrayTip, - 2000
130133Run , " %nircmdPath%" setdisplay monitor:0 1280 800 32 40
134+ Sleep 200
131135return
132136
133137; Shift-Alt-2 change refresh rate to 60Hz
134138+!2 ::
135- TrayTip , ,Refresh Rate 60Hz, 1 , 0
136- Sleep 1000
137139HideTrayTip()
140+ TrayTip , ,Refresh Rate 60Hz, 1 , 0
141+ SetTimer , HideTrayTip, - 2000
138142Run , " %nircmdPath%" setdisplay monitor:0 1280 800 32 60
143+ Sleep 200
139144return
140145
141146; Changing Brightness
142147
143148; Shift-Alt-3 brightness up to 10
144149+!3 ::
145150Run , " %nircmdPath%" changebrightness - 10
151+ Sleep 200
146152return
147153
148154; Shift-Alt-4 brightness down to 10
149155+!4 ::
150156Run , " %nircmdPath%" changebrightness 10
157+ Sleep 200
151158return
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