Awesum Stuff

How to Invoke an Application in the System Tray

I got into a tricky situation when I was required to invoke an Application through the Windows System Tray. The usual way of using SystemUtil.Run or WShell.Run didn’t work as  they didn’t invoke the application, they just put it in the System Tray. And I needed to simulate a click on the System Tray in order to invoke the Application.

I used the Press method of the Wintoolbar object which recognizes the objects in the System Tray on the Basis of their tooltip text. The Example shown here invokes the IP Messenger Application :-


    Set toolbar=Window(“regexpwndclass:=NotifyIconOverflowWindow”).WinToolbar(“text:=Overflow Notification Area”)

    For i=1 to toolbar.GetItemsCount
        If Instr(text,”IPMsg”)>0 Then
        End If    
    If ip<>”” Then
        toolbar.Press ip
        Print “IP Messenger Not Found”
    End If


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s