ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

RunInTrayMod 1.33

(1/4) > >>

MilesAhead:
RunInTrayMod 1.33 I found an AutoIt3 utility to run a client app minimized to tray here:

http://www.cellsworth.com/news/computer-related/35-uncategorizied/96-runintray.html

(It seems the above link may be dead. I got a 404.  But I will leave it struck out in case it is
just a network glitch.  I want to credit the original author if possible.)

I made several modifications and included a tool to generate a shortcut from the client app's shortcut.  The shortcut generator optionally runs the client to capture the exact window title for inclusion in the shortcut.

I call my mod RunInTrayMod.  The modified version with shortcut generator may be downloaded here:

http://www.milesaheadsoftware.org/

Since AutoIt3 creates a Tray Icon by default, RunInTray substituted the icon from the client exe for it's own tray icon.  Double clicking the tray icon toggled show/hide of the client app.  The program depended on the Window Title for all window manipulation.


RunInTrayMod is set up to toggle window hide/show just by left clicking the Tray Icon.

RunInTrayMod gets the title in most cases from the executable process
name. Once the client window is recognized, a window handle is stored
for window manipulations. This allows the window caption to change
without breaking the connection to the window.  Also windows are
closed rather than killed. Less chance of lost data.

Another modification is the short name to the client application is
associated with the tray icon as a ToolTip. For example if Notepad.exe
is the client, hovering the mouse on the tray icon should show "notepad"
in the ToolTip.

Note that if you have several Trayed shortcuts in StartUp Folder it may be advisable to space them out with a startup delay utility. A lot of window creation goes on at logon. A client app that minimized to tray fine when tested alone may have problems with window detection or hiding on startup.  Spacing out the opens and using exact window titles should minimize(pun intended) errors.

Also not every app is compatible. Some will leave orphaned Taskbar icons after being hidden etc..  Some apps such as DVD Flick that have a splash screen may work if the exact window title is specified during shortcut creation.  Otherwise what you get is toggle of the splash screen show/hide. :)

I recommend putting a shortcut to StartMinShortcut shortcut generator in your SendTo Folder.  That way you may right click on any app shortcut and select it from SendTo rather than the tedious process of navigating with the FileOpenDialog.

MilesAhead:
I didn't update the version number.  But I added a call to EmptyWorkingSet() every minute in the idle loop. It seems to cut down the memory shown in Task Manager to less than a MB. Should be acceptable for running several apps Trayed.

Stoic Joker:
I added a call to EmptyWorkingSet() every minute in the idle loop.-MilesAhead (November 27, 2011, 07:41 PM)
--- End quote ---

It's my understanding that calling that excessively can actually hamper performance. I generally only use it after completing some operation that required the application to allocate resources it otherwise wouldn't need to run/function. Like after closing a settings dialog. It could also mask a resource leak that could/should be fixed (not saying you have one as I've never even seen the application in question - I'm just sort of pondering this aloud).

Hopefully someone like f0dder will correct me if I'm off in the weeds here ... I just thought the ^question^ might help.

MilesAhead:
What "performance" are you referring to and what is "excessively?"

RunInTrayMod sleeps in a loop. There is no performance. Only memory usage.  Try running something trayed and watching in Task Manager rather than making theoretical objections and you may see for yourself.

MilesAhead:
RunInTrayMod 1.1.0.0 Added optional -d=n delay param. Valid range is 1 to 60 seconds. 0 for no delay.  The shortcut generator pops up an input box for the delay value, then offers to run the client app to get the window title.

I tried using WinPatrol delay start but it just ran RunInTrayMod.exe with no params.
The delay just uses a call to Sleep(). In the interim you'll see the default AutoIt icon in the tray.  After launching the client the tray icon is replaced by the client's icon.

Running RunInTrayMod with no params shows a usage dialog.  But if you use the shortcut generator all that is handled for you.

Navigation

[0] Message Index

[#] Next page

Go to full version