NSIS安装页面每次显示不同连接的脚本

/*
<NSIS安装页面每次显示不同连接的脚本>
注释:每点击下一次,再返回上一次页面,就显示不同地址!
*/

!AddPluginDir ".\"
!AddIncludeDir ".\"

!include MUI2.nsh
!include LogicLib.nsh

var Field_Namber
; --------------------------------------------------
; General settings.

Name "Test Example For MUI2"
OutFile "Test.exe"
SetCompressor /SOLID lzma

; Installer pages
!define MUI_PAGE_CUSTOMFUNCTION_PRE PRE
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SHOW
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE LEAVE
!insertmacro MUI_PAGE_WELCOME

!insertmacro MUI_PAGE_FINISH

; --------------------------------------------------
; Languages.

!insertmacro MUI_LANGUAGE "SimpChinese"

Section "Dummy" SecDummy
SectionEnd

Function .onInit
InitPluginsDir
FunctionEnd


Function PRE
FunctionEnd

Function SHOW
${If} $Field_Namber == 0
${NSD_CreateLink} 180 275 200 15 "访问我的主页"
Pop $R0
${NSD_OnClick} $R0 Link0
StrCpy $Field_Namber 1
${ElseIf} $Field_Namber == 1
${NSD_CreateLink} 180 275 200 15 "访问X-Star的主页"
Pop $R0
${NSD_OnClick} $R0 Link1
StrCpy $Field_Namber 2
${ElseIf} $Field_Namber == 2
${NSD_CreateLink} 180 275 200 15 "访问小娟的主页"
Pop $R0
${NSD_OnClick} $R0 Link2
StrCpy $Field_Namber 3
${ElseIf} $Field_Namber == 3
${NSD_CreateLink} 180 275 200 15 "访问小黑的主页"
Pop $R0
${NSD_OnClick} $R0 Link3
StrCpy $Field_Namber 0
${Else}
${NSD_CreateLink} 180 275 200 15 "访问我的主页"
Pop $R0
${NSD_OnClick} $R0 Link0
StrCpy $Field_Namber 1
${EndIf}
SetCtlColors $R0 "0XFF0000" "${MUI_BGCOLOR}"
FunctionEnd

Function LEAVE
FunctionEnd

Function LINK0
ExecShell "open" "http://hi.baidu.com/zhfi1022/"
FunctionEnd

Function LINK1
ExecShell "open" "http://hi.baidu.com/XStar2008/"
FunctionEnd

Function LINK2
ExecShell "open" "http://www.blog.163.com/53_54/"
FunctionEnd

Function LINK3
ExecShell "open" "http://hi.baidu.com/736386802/"
FunctionEnd
THE END
喜欢就支持一下吧
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容