!insertmacro inside !macro
Hi,
I have been trying to insert three macros inside another macro definition like this:
!macro Macro1 Arg1 Arg2
;Do stuff with Arg1 and Arg2
!macroend
!macro Macro2 Arg1 Arg2
;Do stuff with Arg1 and Arg2
!macroend
!macro Macro3 Arg1 Arg2
;Do stuff with Arg1 and Arg2
!macroend
!macro Macro4 Arg1 Arg2
!insertmacro Macro1 ${Arg1} ${Arg2}
!insertmacro Macro2 ${Arg1} ${Arg2
!insertmacro Macro3 ${Arg1} ${Arg2}
!macroend
Macro1, Macro2, Macro3 and Macro4 all take two arguments only.
Unfortunately, the compiler complains with the error
!insertmacro: macro "Macro1" requires 2 parameter(s), passed 4!
the first time I "!insertmacro Macro4" :( I can't quite see why this doesn't work.
My questions are:
1) Is it possible to nest macros in this way, and if so what am I doing wrong?
2) If it is not possible, what is the best alternative way to achieve the same effect.
Thanks in advance.