Hello
If someone is interested, it would be easy to write an AppleScript to insert a serial number in a document.
The advantage is that it would be a frozen number.
Two ways to do that:
a - generate a number incremented by one each time you run it.
b - generate a string like the one created by the formula I passed.
The behaviour would be slightly different.
The first version assumes that the last used number is stored somewhere.
The second one is not tied to this obligation.
In fact I was able to write two scripts of a special kind.
They may enclosed in a structure changing them in Services.
Instructions to do that are given in the header of the second script.
The first one inserts the long date_time string where you want.
The second insert a serial number built according to the current
datetime.
--[SCRIPT insertDateTime]
on process()
set curDate to (current date) as Unicode text
--return curDate
end process
--[SCRIPT]
--[SCRIPT insertSerialNumber]
(* From the Script Editor, save this script as a Script
Then pack it as a Service using the tool which you may download from:
http://wafflesoftware.net/thisservice/
Apply the setting: Produces output.
The Service will be directly created, installed and activated
then working with a Services aware application,
select an insertion point then go to
menu theApplication >Services > pasteSerialNumber
will insert the serial number.
*)
on process()
set cd to current date
set serial to (year of cd as text) & text -2 thru -1 of ("0" & (month of cd as number)) & text -2 thru -1 of ("0" & day of cd) & "_" & text -2 thru -1 of ("0" & hours of cd) & text -2 thru -1 of ("0" & minutes of cd) & text -2 thru -1 of ("0" & seconds of cd)
--return serial
end process
--[SCRIPT]
Yvan KOENIG (from FRANCE samedi 19 janvier 2008 21:18:12)