NotifyIcon plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library)
 
m (Updated author and download links, and changed format of some pages.)
Line 1: Line 1:
== Links ==
== Links ==
[http://nsis.sourceforge.net/archive/download.php?file=NotifyIcon.zip NotifyIcon.zip]
<attach>NotifyIcon.zip</attach>


== Description ==
== Description ==
Line 81: Line 81:
-Stu
-Stu


Page author: Afrow UK
Page author: [[User:Afrow UK|Afrow UK]]

Revision as of 12:38, 23 April 2005

Links

NotifyIcon.zip (24 KB)

Description

This is an excellent plugin by brainsucker to create a NotifyIcon on the Windows System Tray. The plugin is very flexible, allowing custom icons, custom text, % install completed etc.

This plugin was created after this topic.

Readme

This readme was changed from its original version in the zip file. Those changes are not marked.
-- deguix

To use:

NotifyIcon::Icon Flags Arguments

Flags is a string of letters with special meaning. Some of such flags need 
some arguments to be passed, in this case they most follow flags specification
in the order flags describe them. :) I never was the master of explaining how
any of my plugins works ;)

So, the flags:
        a       -       add icon*   
        m       -       modify icon*
        r       -       remove icon
                * - these flags will be autodetected, but can be overridden

The following 4 flags could be inverted with '!' char before them (to reset them
to the default state). In this case ('!p') the p flag requires no argument.

        x       -       show taskbar item in minimized state (by default no)
        y       -       show NotifyIcon in normal state (by default no)
        z       -       hide NotifyIcon in minimized state (by default no)

        p       -       indicate progress as tip (requeries argument, tip format.
                        Should look like "it's a progress tip %d%%" or something
                        like that. %% adds % sign, and %d places progress value.

        i       - icon as integer (installer resource icon) (1 arg integer)
        s       - icon as integer (system icon) (1 arg integer)
        f       - icon as file (1 arg file name)
        h       - icon as handle (1 arg handle - integer)

        t       - tip (1 arg - string)

        b       - balloon tooltip without marks (2 args, Title and Tip itself)
        n       - balloon tooltip with INFO mark (2 args, Title and Tip itself)
        w       - balloon tooltip with WARNING mark (2 args, Title and Tip itself)
        e       - balloon tooltip with ERROR mark (2 args, Title and Tip itself)

        o       - set the balloon tooltip timeout (1 arg integer timeout in ms)
                  windows allows values between 10 and 30.

Tip 1. Balloon tooltips are available only at version 5.8 of Comctl32.dll
(Internet Explorer 5.0). At lower versions they will be ignored.
Tip 2. Don't forget using /NOUNLOAD on plugin calls (beside last call, usually
with "r" flag).

Example:
1)   NotifyIcon::Icon /NOUNLOAD "yitb" 103 "Just a tip" "Balloon!" "Cool!" 

     Create notify icon (will be always at tray), with default installer icon.   

2)   NotifyIcon::Icon /NOUNLOAD "fbp" "icon.ico" "Cool Installer" "Installation started" "Completed %d%%"

     Create notify icon from icon.ico, show startup balloon, and use progress
     as icon tip.

3)   NotifyIcon::Icon /NOUNLOAD "!pt" "Tip is back!"

     Remove progress tips and redefine you tip.

4)   NotifyIcon::Icon "r"
        
     Remove icon from tray.

Nik Medved (brainsucker)

-Stu

Page author: Afrow UK