diff options
Diffstat (limited to 'AutoHotkey/hotkeys.ahk')
-rwxr-xr-x[-rw-r--r--] | AutoHotkey/hotkeys.ahk | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/AutoHotkey/hotkeys.ahk b/AutoHotkey/hotkeys.ahk index ab8fc12..47447db 100644..100755 --- a/AutoHotkey/hotkeys.ahk +++ b/AutoHotkey/hotkeys.ahk @@ -104,14 +104,16 @@ DetectHiddenWindows true }
}
;Telegram
-#j::
+#j::
{
-
- ; Check if Telegram is running
- if WinExist("ahk_exe Telegram.exe")
+ ; Target main Telegram window specifically (not notification popups)
+ telegram := "ahk_exe Telegram.exe ahk_class Qt51517QWindowIcon"
+ if WinExist(telegram)
{
- ; If Telegram is running but not in the foreground, bring it to the foreground
- WinActivate("ahk_exe Telegram.exe" )
+ if WinActive(telegram)
+ WinMinimize(telegram)
+ else
+ WinActivate(telegram)
}
}
|