NsExpr plug-in

From NSIS Wiki
Jump to navigationJump to search
Author: Afrow UK (talk, contrib)


Description

A small plug-in that evaluates Boolean and mathematical expressions.

!include nsExpr.nsh
...
 
; Executes code given an expression is true.
${If} ${Expr} `$R0 == 0 || $R1 == 1`
 
; Loops while the expression is true.
${DoWhile} ${Expr} `(R9 > 10 || r9 != 5) && R2 > 3`
 
; Evaluates an expression and returns the result in $R0
${ExprEval} `$R2 < 2 && ($R2 + 5) >= 3` $R0

Download

NsExpr.zip (28 KB)

Stu