Minor example scripts and WinVer.nsh fixes

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6272 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2012-10-16 09:43:36 +00:00
parent b76e823c5c
commit 1f949ccb94
6 changed files with 23 additions and 119 deletions

View file

@ -1,9 +1,11 @@
!include LogicLib.nsh
!include nsDialogs.nsh
!include WinMessages.nsh
Name "nsDialogs Timer Example"
OutFile "nsDialogs Timer Example.exe"
XPStyle on
RequestExecutionLevel user
Var DIALOG
Var TEXT
@ -17,7 +19,7 @@ Page custom nsDialogsPage
Function OnTimer
SendMessage $PROGBAR ${PBM_GETPOS} 0 0 $1
SendMessage $PROGBAR ${PBM_GETPOS} 0 0 $1
${If} $1 = 100
SendMessage $PROGBAR ${PBM_SETPOS} 0 0
${Else}
@ -28,7 +30,7 @@ FunctionEnd
Function OnTimer2
SendMessage $PROGBAR2 ${PBM_GETPOS} 0 0 $1
SendMessage $PROGBAR2 ${PBM_GETPOS} 0 0 $1
${If} $1 = 100
SendMessage $PROGBAR2 ${PBM_SETPOS} 0 0
${Else}
@ -39,10 +41,10 @@ FunctionEnd
Function OnTimer3
SendMessage $PROGBAR3 ${PBM_GETPOS} 0 0 $1
SendMessage $PROGBAR3 ${PBM_GETPOS} 0 0 $1
${If} $1 >= 100
${NSD_KillTimer} OnTimer3
MessageBox MB_OK "Timer 3 killed"
MessageBox MB_OK "Timer 3 killed"
${Else}
SendMessage $PROGBAR3 ${PBM_DELTAPOS} 2 0
${EndIf}
@ -82,6 +84,8 @@ Function nsDialogsPage
${NSD_CreateProgressBar} 0u 52u 100% 12u ""
Pop $PROGBAR2
SendMessage $PROGBAR2 ${PBM_SETBARCOLOR} 0 0x0000FF ; No visual styles
SendMessage $PROGBAR2 ${PBM_SETSTATE} ${PBST_ERROR} 0 ; Vista+
${NSD_CreateButton} 0u 67u 100u 14u "Kill Timer 2"
Pop $BUTTON2