Need help turning a small piece of script into a macro or function, please.
Can anyone take the following code
StrCpy $1 "${__TIMESTAMP__}" -10 -11
IntCmp $1 1 0 less
StrCpy $0 "${__TIMESTAMP__}" -3 -11
;!insertmacro FileCopy '"$EXEDIR\tester.nsi"' '"$EXEDIR\backup-$0"'
goto done
less:
StrCpy $0 "${__TIMESTAMP__}" -3 -10
;!insertmacro FileCopy '"$EXEDIR\tester.nsi"' '"$EXEDIR\backup-$0"'
done:
and turn it into a macro or function which will only return the result/s of string copy?e.g. !insertmacro "$INSTDIR\$TMEDIR" ;C:\in\backup-71653
The above code is a result at compile time. Can someone help with this AND take it a step further by enhancing the script to also be able to write the RUNTIME TIME?
I'll settle for the compile time example but both will be an incredible find. Thank you for your time ;)