Animate plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
 
m (→‎Examples: indent)
 
(3 intermediate revisions by 2 users not shown)
Line 7: Line 7:
== Description ==
== Description ==


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


== Installing ==
== Installing ==
Line 20: Line 20:


; ATIME
; ATIME
: animation time (milliseconds)
: animation time (milliseconds), default 1 sec


; FLAGS
; FLAGS
: animate mode, default blend, see *.nsi samples for possible values
: animate mode, default blend, see *.nsi samples for possible values. Set 0 to skip animation.


; X
; X
Line 40: Line 40:


; COLOR
; COLOR
: window background color for transparent gif's
: window background color for transparent gif's, default COLOR_WINDOW


; FileName
; FileName
: image filename (with extension)
: image filename (with extension)


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




  animate::wait TIME_MS
  animate::wait [/ATIME=xx] [/FLAGS=XX] [/SFG] [/NOCANCEL] [IFNC] TIME_MS
 
; IFNC
: wait if banner was not clicked yet only.


; TIME_MS
; TIME_MS
: time to show/wait for user click
: time to show/wait for user click


Exit strings: clicked, closed, error (thread not exists), terminated
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"
Is safe even if "show" returned "error"


Line 67: Line 71:


== Examples ==
== Examples ==
Desktop center 1 sec fade in (blend) and close
Desktop center 1 sec fade in (default ATIME), 1 sec fade out and close
<highlight-nsis>
<highlight-nsis>
    animate::show /NOUNLOAD animate.gif
animate::show /NOUNLOAD animate.gif
    Pop $0
Pop $0
    animate::wait 0
animate::wait 0
    Pop $1
Pop $1
</highlight-nsis>
</highlight-nsis>


Bottom right corner rising slide 2 sec and show 1 sec (user can close with  
Bottom right corner rising slide 2 sec, show 1 sec and slide out 0.5 sec (user can close with  
left click during last second)
left click during one second of 'wait')
<highlight-nsis>
<highlight-nsis>
    IntOp $R0 ${AW_VER_NEGATIVE} | ${AW_SLIDE}
IntOp $R0 ${AW_VER_NEGATIVE} | ${AW_SLIDE}
    animate::show /NOUNLOAD /ATIME=2000 /FLAGS=$R0 /X=-10 /Y=-10 animate.gif
animate::show /NOUNLOAD /ATIME=2000 /FLAGS=$R0 /X=-10 /Y=-10 animate.gif
    Pop $0
Pop $0
    animate::wait 1000
animate::wait /ATIME=500 1000
    Pop $1
Pop $1
</highlight-nsis>
</highlight-nsis>


[[Category:Plugins]]
[[Category:Plugins]]

Latest revision as of 22:37, 1 September 2015

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