How to minimize KeyHistory window to taskbar? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

How to minimize KeyHistory window to taskbar?

Post by mslonik » 05 Feb 2023, 07:03

Dear Forum,

I've found extremely useful "KeyHistory" window of AutoHotkey. I'd like to keep it mimized upon pressing of Esc key. By default (by design?) it is minimized to system tray intead of taskbar. What I'd like to get is to minimize this window to taskbar:

Code: Select all

#NoEnv					; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance, force		; Only one instance of this script may run at a time!
#Warn					; Enables every type of warning and shows each warning in a message box.

#Persistent				; Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
#InstallKeybdHook			; Forces the unconditional installation of the keyboard hook.
#InstallMouseHook			; Forces the unconditional installation of the mouse hook.
#KeyHistory, 500			; For debugging purposes. 500 is maximum allowed value

KeyHistory
WinMaximize, A

Esc::
	WinMinimize, A
return
On this forum there are multiple solutions to reverse issue: how to minimize window to system tray instead of taskbar. I couldn't easily find a way to solve my issue.

Is there any simple workaround?

Kind regards, mslonik

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:

User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: How to minimize KeyHistory window to taskbar?  Topic is solved

Post by mikeyww » 05 Feb 2023, 09:05

You can deactivate the window.

Code: Select all

#Requires AutoHotkey v1.1.33
script := A_ScriptFullPath " ahk_class AutoHotkey ahk_exe AutoHotkey.exe"

F1::
KeyHistory
WinWaitActive % script,, 2
If !ErrorLevel
 WinMaximize
Return

#If WinActive(script)
Esc::
WinSet Bottom
MouseGetPos ,,, hWnd
WinActivate % "ahk_id" hWnd
Return
#If

User avatar
mslonik
Posts: 144
Joined: 21 Feb 2019, 04:38
Location: Poland
Contact:

Re: How to minimize KeyHistory window to taskbar?

Post by mslonik » 07 Feb 2023, 16:20

Thank you @mikeyww, it works! I didn't know this "trick". Surprisingly AutoHotkey help mentiones about shortcut:
The effect is similar to pressing Alt+Esc.
I'm glad you've teached me something new :bravo:

My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon👍
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey :ugeek:

Post Reply

Return to “Ask for Help (v1)”