Gadget Systray Icons

Wednesday, December 14, 2005 by Sranshaft | Discussion: DesktopX

Is there any way to change the systray icon of gadgets on the fly through scripting? The documentation on it is sparse at best...for such an 'amazing developement tool' the documentation to go along with it is leaves something to desire. One case in point: the SetFontName call...I can't for the life of me get it to change the font name even though I've followed what the guide says.

If anyone can respond to this question I'd be most appreciative. Though whether anyone does or not...still trying to get help using ConnectObject which doesn't seem to work either though the script is correct. DesktopX keeps spitting back garbage at me.
thomassen
Reply #1 Wednesday, December 14, 2005 8:54 AM
Don't think you can change the systray icon. At least I haven't seen anything documented.

for the Font, the reason why your code does work is because there is no SetFontName.

The syntax is:

Object.SetFont fontName, size, boolBold, boolItalic, boolUnderline, boolStrikeOut, lfCharSet
You can leave the last parameter = 0


Unfortunately there is not way to set each font property individually, you can only read them individually. Hopefully this will change in a future update as it's a bit awkward.

"ConnectObject"? NOt sure what you are refering to there....
Sranshaft
Reply #2 Wednesday, December 14, 2005 4:47 PM
ConnectObject is a scripting property that allows a script to see events fired by an external program that's been hooked by the CreateObject property.

See: Link for a better explanation.

As for setting the individual aspects of the font according to the *cough* documentation it apparently is possible, I think. Like I said before I feel the manual, at least the scripting part of it, should be rewritten with clear and consise information.

Object.FontName, Object.FontSize, Object.FontBold, Object.FontItalic, Object.FontUnderline, Object.FontStrikeout
also Object.States("name").FontName, Object.States("name").FontSize, Object.States("name").FontBold, Object.States("name").FontItalic, Object.States("name").FontUnderline, Object.States("name").FontStrikeout

Let you get/set individual font options.


The last sentence states that you can and yet DesktopX says it's a No-no...

I haven't seen anything documented either and if this isn't possible now, it should be in the next version. This would open even more options and I can already think a couple ideas where this would be excellent (weather gadget that changes the tray icon to reflect the weather, album cover art, wallpaper changer, etc...)

Thanks for your response though Thomassen. Finally someone's answered (sort of) my questions.
thomassen
Reply #3 Wednesday, December 14, 2005 8:33 PM
It's true that the manual says that these properties are read and write, but as you have notived they are read only. The history also says they are read only. I've reported this earlier and I know that they are aware of it, but... hopefully it will change soon. Lets hope the functionality will change and not the docs.
thomassen
Reply #4 Wednesday, December 14, 2005 8:36 PM
That ConnectObject seem pretty nifty. I will have to have a look at that one. Thanks for the link.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01