Is it possible to create a system tray icon via vbscript (as opposed to
visual basis itself)?

I would like to place an icon in the system tray while one of my scripts are
running.

Re: System Tray Icons by mr_unreliable

mr_unreliable
Tue Jun 13 17:09:23 CDT 2006

Rob, this is not possible to do from script "natively",
i.e., there is nothing (afaik) in the language.

It requires an api call to set an icon in the system tray,
"Shell_NotifyIcon", but this is not an api which is callable
from a scriptable api caller (like Dynawrap), because of two
complications. For one, the api requires a typedef as a
parameter, and typedefs are difficult to create using script.
The other complication is that "Shell_NotifyIcon" is a
"callback-type" api call -- that is, you have to give it the
address of a "callback routine" which the system will call
with various notifications (for example, your icon was clicked).

Your best bet would be to find some routine to use that is
COM-compliant, so that you can call it from script.

Another option is to write one yourself. There are numerous
sample code demos, written in vb, delphi, and c++, which you
could wrap up in a COM wrapper for use from script.

Another option is to use a scripting language that DOES allow
for calling api's, creating typedefs, and setting up callbacks.
One such language is AutoIt3(beta):

http://www.autoitscript.com/autoit3/

Another such language is the "Freestyle Basic Script Language"
(FBSL):

http://www.fbsl.net/phpbb2/index.php

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)


Rob wrote:
> Is it possible to create a system tray icon via vbscript (as opposed to
> visual basis itself)?
>
> I would like to place an icon in the system tray while one of my scripts are
> running.
>
>