Skip to content

Commit 6d55e94

Browse files
committed
added tray tooltip/toast on settings change
1 parent ff6e536 commit 6d55e94

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

UAC-Focus.ahk

+14-13
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
Startup parameters:
1111
-notify start with "Notify on focus" enabled by default
1212
-notifyall start with "Notify always" enabled by default
13-
13+
1414
-beep start with "Beep on focus" enabled by default
1515
(temporarily disabled due to issue with flashing windows)
16-
16+
1717
-beepall also beep when the UAC window pops up already focused by the OS
1818
-showtip display current settings in a tray tooltip at script startup
1919
-noflash do not briefly change tray icon when the UAC window gets focused
@@ -30,8 +30,8 @@
3030

3131

3232
; Vars
33-
version := "v0.7.4"
34-
app_name := "UAC-Focus by lightproof"
33+
global version := "v0.7.5"
34+
global app_name := "UAC-Focus by lightproof"
3535
global tray_icon := A_ScriptDir "/assets/icon.ico"
3636
global tray_icon_flashed := "HICON:*" . icon_green()
3737
global repo := "https://github.com/lightproof/UAC-Focus"
@@ -225,12 +225,13 @@ OnMessage( MsgNum, "ShellMessage" )
225225
}
226226
}
227227

228+
Return
228229

229230
; ================================================================================================
230-
; ^r::Reload
231+
; ^r::Reload
231232

232233

233-
; Functions
234+
; Functions
234235
set_tray_icon(tray_icon)
235236
{
236237
if FileExist(tray_icon)
@@ -252,7 +253,7 @@ OnMessage( MsgNum, "ShellMessage" )
252253
TrayTip, UAC-Focus, Window focused, 3, 1
253254

254255
if tray_flash
255-
SetTimer, flash_tray_icon, -10
256+
SetTimer, flash_tray_icon, -50
256257
}
257258

258259

@@ -275,7 +276,7 @@ OnMessage( MsgNum, "ShellMessage" )
275276

276277
rename_help_button(about_window)
277278
{
278-
loop,
279+
loop,
279280
{
280281
If WinExist(about_window)
281282
{
@@ -331,16 +332,16 @@ OnMessage( MsgNum, "ShellMessage" )
331332
Menu, Tray, Icon, %tray_icon_flashed% ; Use embedded icon data
332333
sleep 2000
333334
set_tray_icon(tray_icon)
334-
335+
335336
/*
336337
Additional icons to consider:
337-
338+
338339
White balloon tip with "i"
339340
Menu, Tray, Icon, %A_Windir%\system32\shell32.dll, 222
340-
341+
341342
Green shield with checkmark
342343
Menu, Tray, Icon, %A_Windir%\system32\imageres.dll, 102
343-
344+
344345
Blue circled arrows
345346
Menu, Tray, Icon, %A_Windir%\System32\shell32.dll, 239
346347
@@ -401,7 +402,7 @@ OnMessage( MsgNum, "ShellMessage" )
401402
{
402403
loop_index := A_Index - 1 ; Because notify_lvl starts with 0
403404
notify_lvl_name := lvl_name_%loop_index%
404-
405+
405406
if A_ThisMenuItem = %notify_lvl_name%
406407
{
407408
notify_lvl = %loop_index%

0 commit comments

Comments
 (0)