最新消息:

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

nsis 永恒心锁 1941浏览 0评论
/*
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
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » SpiderBanner是NSIS类似复制文件进度条的插件

您必须 登录 才能发表评论!