Hi, executing the zScript\date.zm macro inserts the date in dd/mm/yyyy format but also outputs a line like Day: 0 Month: 0 Year 0 and shows the debug output window with the contents as below.
The macros with the .zm file extension are the original Zeus macros that ran using a 'home-grown' scripting engine. The bug you are seeing is some aging of that engine which was long ago relaced by more powerful engines running Python and Lua. This particular error is a date function that appears to no longer exist.
In any case the date.zm macro can be fixed by making the following code changes:
int DateMacro()
{
// this macro will only work for document windows so check first
if (is_document() == 0)
{
message("This macro only works for document files!");
beep();
return;
}
StampDateTime();
MoveLineEnd();
Enter();
Enter();
string current_date = macro_tag("$DT<d MMMM yyyy>");
printf("%s\n", current_date);
Enter();
string day = macro_tag("$DT<dd>");
string month = macro_tag("$DT<MM>");
string year = macro_tag("$DT<yyyy>");
printf("%s/%s/%s", day, month, year);
return 1;
}
That makes sense, thanks Jussi. To be honest, it's something I stumbled upon by accident so I thought I'd report it but its not like its a big deal. I was on the Execute Script dialog where I happened to enter just date instead of datetime and got surprised by the error.
As an aside, are both the Python and Lua macro engines considered current and fully supported?