Page 1 of 1

Putting AHK in Tray notification area - but as an executable button

Posted: 21 Aug 2023, 04:47
by A Keymaker
Is there some way an AHK file or LNK leading to it can be placed permanently in the Tray notification area of Windows 10- but in a way that it would behave like some EXE pinned to Taskbar [i.e. in a permanent way] ?

Or maybe some other script file?

Re: Putting AHK in Tray notification area - but as an executable button

Posted: 23 Aug 2023, 11:56
by ahk7
Broad question, broad answer:

Yes, you can replace the standard tray menu with your own and how it should respond to clicks - see
https://www.autohotkey.com/docs/v1/lib/Menu.htm#Click
One click to go to a label (menu handler), and in that label you can do what you want of course

Re: Putting AHK in Tray notification area - but as an executable button

Posted: 22 Sep 2023, 01:54
by A Keymaker
Good to know, thank you

But for my purposes this would not work because the goal is to have always visible fail-safe / panic button that fires a script which kills [in many ways] whatever scripts are running in a given moment- which sometimes I have to press quickly multiple times to break some loop that causes an AHK file to be re-opened or e.g. CMD windows keep opening themselves

Re: Putting AHK in Tray notification area - but as an executable button

Posted: 20 Jan 2024, 04:56
by A Keymaker
So does any one has any ideas about how to insert some script into the Tray and make it stay there as an always accessible icon, even if its execution will kill or running scripts system wide?

Re: Putting AHK in Tray notification area - but as an executable button

Posted: 20 Jan 2024, 10:45
by ahk7
If you want a tray icon to be always visible e.g. not having to click the ^ in tray area, you can just drag the icon to the taskbar and it will place it in the visible area. Probably better would be to setup a hotkey to kill all scripts which is probably faster to access than grabbing for the mouse, moving to tiny tray icon area and clicking.