Disclaimer

The content of this blog is my personal opinion only. Although I am an employee - currently of Imagination Technologies's MIPS group, in the past of other companies such as Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Thursday, June 01, 2017

Minimize AHK GUI window to taskbar (not desktop, not tray)

Took me a long time to find this, so posting for the benefit of future-forgetful-me, and possibly others.  (But not motivated enough to post to AHK fora or Stackexchange.)

I have an AutoHotKey script that creates several, possibly many, AHK gui windows.  Number not known in advance. Dynamically. When user asks.

PROBLEM: when script first started running, minimizing these GUI windows minimized to the desktop. In a manner familiar to old X Windows users, from the days predating taskbars and docks, etc.

It did NOT minimize to the taskbar.

Nor did they minimize to the tray.

They minimized to the desktop.

Screen clipping:






You can see the generic AHK taskbar button and the icon for my guix-sebp.ahk script , which I manually pinned to the taskbar.

But you also see the littl;e non-taskbar minimized windows.  Here it happens to be above the taskbar - in actuality, they might appear randomly, in the midle of a different display. Augh!!!



Many web.questions asking how to minimize to tray, I did not find anyone talking about minimizing to taskbar.

Much posting about hooking the XXGuiSize() function called when the AHK GUI windows are resized, maximized, or minimized.  But XX here is the GUI window name.  Since I don't know in advance how many such windows an instance will have, nor their names, I would have to generate such functions on the fly.

There does not appear to be a way to have all GUI windows share a single GuiClose() hook.

---

The way to minimize to taskbar:
GUI: "+E0x40000 would add the WS_EX_APPWINDOW style, which provides a taskbar button for a window that would otherwise lack one. "  'via Blog this'
giving


QED

No comments: