Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#213 Short syntax for !insertmacro

open
Amir Szekely
NSIS (71)
5
2009-10-30
2009-10-30
Anonymous
No

Command `!insertmacro MyMacro` is very verbose so very often script writer do this trick:
<code>
#define macro a b
!macro MyMacro
# ...
!macroend

#define shortcut for macro
!define MyMacro `!insertmacro MyMacro`

#use macro
${MyMacro} $a $b
</code>

It would be very handy if NSIS has syntax like `!{MyMacro}` for macros instead of `!insertmacro MyMacro`.

Discussion