How to Write a scripting language to achieve the flame effect

Source: Internet
Author: User

How to Write a scripting language to achieve the flame effect

 

(If you are interested, copy the following code to the NSIS plug-in and run it)

/*

If you have this effects, please keep!

Writer: [Mr. Z_production · JUAN]

Http://blog.163.com/53_54

Thanks: Restools, zhfi, X-Star

*/

! AddPluginDir "."

! AddIncludeDir "."

! Include MUI2.nsh

;--------------------------------------------------

; General settings.

Name "Flame_Effects Example"

OutFile "NSIS_fire.exe"

SetCompressor/SOLID lzma

ReserveFile "$ {NSISDIR} Pluginssystem. dll"

ReserveFile firectrl. dll

;--------------------------------------------------

; MUI interface settings.

! Define MUI_FINISHPAGE_NOAUTOCLOSE

;--------------------------------------------------

; Insert MUI pages.

! Define MUI_WELCOMEFINISHPAGE_BITMAP WizModernImage-Is.bmp

; Installer pages

! Define MUI_PAGE_CUSTOMFUNCTION_PRE pre

! Define MUI_PAGE_CUSTOMFUNCTION_LEAVE leave

! Define MUI_WELCOMEPAGE_TEXT "flame effect"

! Insertmacro MUI_PAGE_WELCOME

! Insertmacro MUI_PAGE_INSTFILES

! Define MUI_PAGE_CUSTOMFUNCTION_Pre pre

! Define MUI_PAGE_CUSTOMFUNCTION_LEAVE leave

! Insertmacro MUI_PAGE_FINISH

;--------------------------------------------------

; Ages.

! Insertmacro MUI_LANGUAGE "english"

Function. onGUIEnd

SetPluginUnload manual

Firectrl: disablefire

System: Free

FunctionEnd

Function. onInit

InitPluginsDir

SetOutPath $ PLUGINSDIR

File firectrl. dll

SetOutPath $ TEMP

FunctionEnd

Function Pre

System: Call 'user32: LoadImage (I, t, I,) I (0, "$PLUGINSDIRmodern-wizard.bmp", 0, 0, 0, 0, 0x10). s'

Pop $ R0

System: Call '$ PLUGINSDIRfirectrl: enablefire (I, I) I ($ HWNDPARENT, $ R0, 50 )'

FunctionEnd

Function leave

System: Call '$ PLUGINSDIRfirectrl: disablefire ()'

FunctionEnd

Section "Dummy" SecDummy

SectionEnd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.