Animate plug-in

From NSIS Wiki

Author: Takhir (talk, contrib)


Links

Download:
Animate.zip (38 KB)

Description

animate.dll - notifications and startup image banner plug-in with slide/roll/fading effects (win2k/Win98). Supports gif, jpeg and some other OleLoadPicture() formats. Can return splash HWND to work with other plug-ins (Marquee, AnimGif). Compatibility: Win98+, Win2K+. Patch for WinNT 4.0 (no animation, but window visible).

Installing

Unzip and place the .dll file into the Plugins directory.

Entry points and parameters (NSIS script)

animate::show /NOUNLOAD [/ATIME=xx] [/FLAGS=XX] [/X=xx] [/Y=xx] [/SFG] [/NOCANCEL] \
 [/COLOR=0xRRGGBB] [/BORDER] FileName
ATIME
animation time (milliseconds), default 1 sec
FLAGS
animate mode, default blend, see *.nsi samples for possible values. Set 0 to skip animation.
X
gap from desktop workarea borders. From right border if <0, from left border otherwise. Default - workarea center.
Y
the same as X for vertical placement
SFG
tries to set parent window foreground on exit
NOCANCEL
not allow user to close window with left mouse button click
BORDER
create window border
COLOR
window background color for transparent gif's, default COLOR_WINDOW
FileName
image filename (with extension)

Exit strings: show, error (could not load image)


animate::wait [/ATIME=xx] [/FLAGS=XX] [/SFG] [/NOCANCEL] [IFNC] TIME_MS
IFNC
wait if banner was not clicked yet only.
TIME_MS
time to show/wait for user click

Reason to exit (string in stack): "click", "wait", "error" (thread not exists), "terminate". With /NOCANCEL option reports "click", but user click not closes window. Is safe even if "show" returned "error"


animate::hwnd
Gets splash window handle (use Pop to take it from stack)


After animation finished and "show" returned control to installer user can close window with left mouse button click (depends on /NOCANCEL option). The same with "wait" - window may be closed if /NOCANCEL not set. Any case it will be closed after "wait" time expired.


Examples

Desktop center 1 sec fade in (default ATIME), 1 sec fade out and close

animate::show /NOUNLOAD animate.gif
Pop $0
animate::wait 0
Pop $1

Bottom right corner rising slide 2 sec, show 1 sec and slide out 0.5 sec (user can close with left click during one second of 'wait')

IntOp $R0 ${AW_VER_NEGATIVE} | ${AW_SLIDE}
animate::show /NOUNLOAD /ATIME=2000 /FLAGS=$R0 /X=-10 /Y=-10 animate.gif
Pop $0
animate::wait /ATIME=500 1000
Pop $1
Personal tools
donate
ads