SpiderBanner是NSIS类似复制文件进度条的插件

/*
SpiderBanner是NSIS类似复制文件进度条的插件
spiderBanner类似于初始化界面,复制文件或其他操作的时候有一段等待时间让用户可以看到操作的进度.
*/
!AddPluginDir "../../Plugins"
Name "Example"
OutFile "Example.exe"
RequestExecutionLevel User
Page Custom PagePre PageLeave
Page InstFiles
ShowInstDetails Show
ShowUnInstDetails Show
Function .OnInit
 InitPluginsDir
 File /oname=$PLUGINSDIRpage.ini "Page.ini"
FunctionEnd
Function .onGUIEnd
 SpiderBanner::Destroy
FunctionEnd
Function PagePre
 InstallOptions::dialog /NOUNLOAD "$PLUGINSDIRpage.ini"
FunctionEnd
Function PageLeave
 ReadINIStr $R0 "$PLUGINSDIRpage.ini" "Field 2" "State"
 StrCmp $R0 1 +1 +3
 StrCpy $R0 "/TL"
 GoTo next
 ReadINIStr $R0 "$PLUGINSDIRpage.ini" "Field 3" "State"
 StrCmp $R0 1 +1 +3
 StrCpy $R0 "/TR"
 GoTo next
 ReadINIStr $R0 "$PLUGINSDIRpage.ini" "Field 4" "State"
 StrCmp $R0 1 +1 +3
 StrCpy $R0 "/BL"
 GoTo next
 ReadINIStr $R0 "$PLUGINSDIRpage.ini" "Field 5" "State"
 StrCmp $R0 1 +1 +3
 StrCpy $R0 "/BR"
 GoTo next
 ReadINIStr $R0 "$PLUGINSDIRpage.ini" "Field 6" "State"
 StrCmp $R0 1 +1 +2
 StrCpy $R0 "/CENTER"
next:
 ReadINIStr $R1 "$PLUGINSDIRpage.ini" "Field 7" "State"
 ; Modern tag.
 ReadINIStr $R2 "$PLUGINSDIRpage.ini" "Field 9" "State"
 StrCmp $R2 0 +2
 StrCpy $R2 "/MODERN"
FunctionEnd
Section
 SpiderBanner::Show $R0 $R1 $R2
 DetailPrint "Waiting..."
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 DetailPrint "Hello World!"
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 DetailPrint "This is a demonstration."
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 DetailPrint "Go on!"
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 SpiderBanner::Destroy
 SpiderBanner::ShowPBOnly
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 Sleep 100
 DetailPrint "Now we are finished."
 Sleep 100
 SetAutoClose False
SectionEnd
THE END
喜欢就支持一下吧
点赞6 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容