[Done] Function to Modify Existing Tray Icon Properties

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

[Done] Function to Modify Existing Tray Icon Properties

Post by jpuziano » Thu May 26, 2011 3:43 pm

Hi Marcus and All,

For my compiled MS apps I like to use a systray icon and allow the user to "minimize to systray". We can set the tooltip text that displays when the user hovers the mouse pointer over the systray icon. Multi-line tooltip text is possible just by including %CR% in the string, for example:

Code: Select all

Let>use_counter=0
AddTrayIcon>\\123.123.12.123\myapp\myapp.ico,MyTrayIcon,MyApp%CR%Uses: %use_counter%
AddTrayHandler>MyTrayIcon,OnClick,DoMyAppMainWindow
AddTrayHandler>MyTrayIcon,OnDblClick,DoMyAppMainWindow
The above AddTrayIcon> tooltip parameter will make the tooltip text display as follows:

MyApp
Uses: 0

My problem is, when the variable use_counter changes, I want the tooltip text to show the new value. I was not able to find a way to do this so I put in a support request and the reply was:
Marcus Tettmar, May-26 10:53 (BST): wrote:All I can do right now is add to the wish list a new function for modifying the tray properties (such as the tooltip). At present it can only be created, and deleted. There's no way to modify an existing tray icon. So we need a new function for this.
Yes Marcus, please add this to the Wish List... much appreciated.

The following Enhancement Suggestions also relate to tray icons so perhaps they could all be considered/developed as a whole: :)

[Open] Is a Right-Click Menu for System Tray Icon Possible?

AddTrayIcon Suggestion

By the way... if anyone out there knows a Win API function that can actually modify the tooltip text on an existing tray icon, please let us know.

Thanks and take care
Last edited by jpuziano on Mon Nov 21, 2011 8:16 pm, edited 1 time in total.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Sat Aug 20, 2011 7:04 pm

Hi Marcus,

- a new function for modifying the tray properties (such as the tooltip)

Is there any hope that this new function might be available in the next major release of Macro Scheduler?


By the way, many thanks for fixing this in Macro Scheduler 12.1.10:
Obscure to most perhaps, but it was critical for me... thanks again.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Mon Nov 21, 2011 7:39 pm

Updating theAddTrayIcon> tooltip parameter is now possible with version 13
ModTrayIcon>Name,Hint,IconFileName,Visible

Modifies a tray icon created with the AddTrayIcon command. Specify the name of the icon to modify.

Hint can contain either an empty string or a new hint text. If empty the hint is not changed.

IconFileName can contain either an empty tring or a .ico file name. If empty the icon image is not changed

Visible can be True or False to show or hide the icon.

Example

ModTrayIcon>MyTrayIcon,Don't Click Me!,,True

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Mon Nov 21, 2011 8:15 pm

Rain wrote:Updating theAddTrayIcon> tooltip parameter is now possible with version 13
Yup it sure is... so I just updated the subject line of this post from Open to Done.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts