Simple loop testing macro

From NSIS Wiki

Author: Afrow UK (talk, contrib)


[edit] Description

This simply shows a MessageBox with OK and Cancel buttons for use in loops which are infinitely looping. You pass it a string which can contain variables to test. When pressing cancel, the installer will abort.

[edit] Usage

${LoopTest} "$R0, $R1, $R2"

[edit] The Macro

!macro LoopTest Message
 MessageBox MB_OKCANCEL|MB_ICONINFORMATION "${Message}" IDOK +2
  Abort
!macroend
!define LoopTest "!insertmacro LoopTest"
-Stu
donate
ads