1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
%% Copyright (C) 2005 Tycho Softworks.
%%
%% This file is free software; as a special exception the author gives
%% unlimited permission to copy and/or distribute it, with or without
%% modifications, as long as this notice is preserved.
%%
%% This program is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
%% implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%% This defines some general case and convenience macros
use time
%% record a file with rename and include a date stamp
macro record-stamp
keywords limit name prefix extension exitkey min intro
define limit="600s" min="0" extension={.au} exitkey={#} stamp="date"
begin
date %dnow
time %tnow
case !defined %prefix
const %tmp tmp- %session.timeslot %extension
const %ren %name %extension
otherwise
const %tmp %prefix / tmp- %session.timeslot %extension
const %ren %prefix / %name %extension
endcase
erase %tmp
case %stamp == "date"
if -defined %intro
then
build %tmp %intro &date %dnow
else
build %tmp &date %dnow
endif
case %stamp == "time"
if -defined %intro
then
build %tmp %intro &time %tnow
else
build %tmp &time %tnow
endif
otherwise
if -defined %intro
then
build %tmp %intro &date %dnow &time %tnow
else
build %tmp &date %dnow &time %tnow
endif
endcase
beep
cleardigits
timer %audiotimer
append %tmp %ren exit=%exitkey timeout=%limit
if %min > 0 and %audiotimer < %min then erase %ren
return
|