;Usage:
;
;open a new select statement
;!insertmacro SELECT <selectname> <selectvalue>
;add case statements
;!insertmacro CASE <comparevalues>
;!insertmacro CASE <comparevalues>
;if comparison not found, optional
;!insertmacro CASE_ELSE
;close select statement
;!insertmacro SELECTEND
;
;Variable descriptions:
;<selectname> is if you want multiple selects
;<selectvalue> is the value to compare too
;<comparevalues> is a ";" delimited string of the compare values
Section
!insertmacro SELECT "TESTCASE" "test1"
!insertmacro CASE "test1"
MessageBox MB_OK "case test1"
!insertmacro CASE "test 2;test3"
MessageBox MB_OK "case test2 or test3"
!insertmacro CASE_ELSE
MessageBox MB_OK "case else"
!insertmacro SELECTEND
SectionEnd
Select Statements
Another library I slapped together to make things a little easier. This one provides NSIS with the select statement functionality.