Jump to content
Macro Express Forums
DMGberg

Minimize To Tray?

Recommended Posts

No, other progs I use frequently but not continually. Task bar real estate is always at a premium. There is a "minimize" command and a "hide" command but no "minimize to tray."

Share this post


Link to post
Share on other sites

I have tried a couple of those programs and am using one now. None of them meet my needs so I just thought that I might be able to do it for 2 or 3 standard apps that I always use but don't want cluttering up the taskbar, using ME.

I've looked into it more. It is more complicated than it would appear, many API calls. I might mess with it myself, maybe.

Share this post


Link to post
Share on other sites

I just wrote a macro for myself that HIDES the current window, then wrote another macro that displays a list of the hidden windows from which you select the one you wish to display. (I set an arbitrary limit of 10 windows that I could hide).

 

Wrote them during lunch today and tested them while working this afternoon. Seems to work pretty good.

 

Forgot to bring them home with tonight but could post them later if your interested.

 

Ralph

Share this post


Link to post
Share on other sites

Ralph,

Thanks so much! You've got me started on what I need. I don't need them to be in the tray, I just don't want them cluttering the taskbar.

When I get it tinkered, I'll post it back here. I've changed it so it won't "error" if you click "OK" without having selected a window. I'm working on having it default to the first "hidden" so one can keyboard down (if that control does that) as I don't like to use the mouse any more than I need to. I'll then do an autorun on start to have all my regulars open but hidden (Total Commander, Ecco, stuff like that) and can do defined hotkeys for each of my regulars.

Again, thanks for pointing the way.

All of those third party "minimize to tray" utilities I used were a little kinky and/or buggy. I even paid for one.

Dan

Share this post


Link to post
Share on other sites

Sounds great, looking forward to any improvements. I've notice a couple of bugs also, this was my first attempt at ME programming other than some quick one or two liners. Anyway, keep me posted.

 

Ralph

Share this post


Link to post
Share on other sites

Just discovered repeat until. :-)

 

Changed the Hide macro to:

 

<IFREG:2:2:HKEY_CURRENT_USER\Software\MacroExpress\><REGCREATE:HKEY_CURRENT_USER\Software\MacroExpress><ENDIF><TVAR2:01:06:><IVAR2:01:01:1><REP3:08:000005:000002:0001:0:01:11><IFREG:1:2:HKEY_CURRENT_USER\Software\MacroExpress\Hidden%N1%\><REGCREATE:HKEY_CURRENT_USER\Software\MacroExpress\Hidden%N1%><REGWSTR:1:HKEY_CURRENT_USER\Software\MacroExpress\Hidden%N1%><WHIDE:"CURRENT"><MRETURN><ENDIF><NMVAR:01:01:1:0000001:2:0000001><ENDREP>

 

Now I'm going to do something similar to the Show/Activate macro ... but you get the idea.

Share this post


Link to post
Share on other sites

Here is a generic version of what I needed. It creates the registry key (more efficiently done by hand probly since it will be persist after you run the macro once), opens and activates the program if it isn't already, and toggles the show/hide state.

 

<IFREG:2:2:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State>

<REGCREATE:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State>

<ENDIF>

<IFOTH:14:1:SOMEAPP.EXE>

<LAUNCHNO3:0:0112AppWindowTitle<LAUNCH:SOMEAPP.EXE2><

<DVAR2:01:01:1>

<REGWDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State>

<MSTOP>

<ENDIF>

<REGRDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State>

<TVAR2:01:01:AppWindowTitle

<IFVAR2:3:01:1:0><

WSHOW:%T1%>

<ACTIVATE2:%T1%><

DVAR2:01:01:1>

<REGWDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State>

<ELSE>

<WHIDE:%T1%>

<DVAR2:01:01:0>

<REGWDEC:1:HKEY_CURRENT_USER\Software\MANUFACTURER\SomeApp\State>

<ENDIF>

(Caution: does not run as pasted above because of  's etc)

I could next create an uber-macro to create this macro for any app, create the registry key (more generically under the Macro Express key as you did), run an app picker dialogue, grab the window title, and set a hot-key. Would be fun but I got what I need now and it's getting late.

Thanks again.

toggle_app.mex

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...