From ea03aa8eb432f0cd6c00de503147ebb6544380c3 Mon Sep 17 00:00:00 2001 From: Lightproof <97461556+lightproof@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:46:39 +0400 Subject: [PATCH] also show alt icon in tray tooltip/toast on focus --- UAC-Focus.ahk | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/UAC-Focus.ahk b/UAC-Focus.ahk index be5896b..0b886ec 100644 --- a/UAC-Focus.ahk +++ b/UAC-Focus.ahk @@ -29,7 +29,7 @@ ; Vars - global version := "v0.7.7" + global version := "v0.7.8" global app_name := "UAC-Focus by lightproof" global tray_icon := A_ScriptDir "/assets/icon.ico" global tray_icon_flashed := "HICON:*" . icon_green() @@ -244,18 +244,28 @@ Return winactivate ; PostMessage, WM_SYSCOMMAND := 0x0112, SC_HOTKEY := 0xF150, %hwnd%,, - + if not (beep = "Off") { SoundBeep, , 100 SoundBeep, , 100 } - + if (notify_lvl = "1" or notify_lvl = "2") + { + + ; Set flashed icon here first so it is shown in notification tip/toast + if tray_flash + Menu, Tray, Icon, %tray_icon_flashed% + TrayTip, UAC-Focus, Window focused,,4 + set_tray_icon(tray_icon) + } if tray_flash + { SetTimer, flash_tray_icon, -50 + } }