View Single Post
Old 27th February 2013, 07:44   #1
davidhary
Junior Member
 
Join Date: Feb 2013
Posts: 1
Using Funtions in Compile Time

I got the date functions from the NSIS site (http://nsis.sourceforge.net/Manage_dates_as_numbers) and would like to get the today serial value during compile time.

I envisioned running the script as follows:

code:

!define day
!define !DaySerial `!insertmacro _!DaySerial`
!macro _!DaySerial _SERIAL
Call TodaySerial
Pop ${_SERIAL}
DetailPrint ${_SERIAL}
!macroend
${!DaySerial} day



But I am getting an error on the call:
Quote:
Error: command Call not valid outside Section or Function
Error in macro _!DaySerial on macroline 1
Apparently, the CALL command cannot be executed from a compile time macro.

My question is: How can I call the function in compile time?

Thanks

David
davidhary is offline   Reply With Quote