[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: U2 for date last saved
- Subject: Re: U2 for date last saved
- From: Carl Distefano cld@xxxxxxxx
- Date: Thu, 06 Sep 2007 22:40:50 -0400
Reply to note from Harry Binswanger Thu, 06 Sep
2007 15:00:30 -0400
Harry:
> What I'm looking for is a way to get (for use in a
> RunningHeader) the date the file was last saved, so that when I
> have printouts of 12 versions of a given file all lying around,
> I now which is the most recent.
If you don't mind having data embedded after the End_Of_File
character in your document, the easiest way to do this is to enable
Document Information. That is, set default IO=1, then embed
and in your file (command VA ^MD and VA ^MT). Note,
however, that for these VAs to work, the file must have been
*created* while Document Information was enabled; simply changing
default IO=1 and embedding the VAs in an existing file will not work
(even if you STore and reCAll the file after embedding the VAs).
For an existing file, you have to MErge it into an new (Untitled)
window, delete the original file, then SAve the Untitled file under
a new (that is to say, the original) filename. Here's an XPL
program that automates the operation, without disturbing the current
state of default IO. This routine will appear in the next release
of U2 as frame AddDI. For present purposes, you can RUN it as a
free-standing program file (save to disk as AddDI.PM, then RUN
AddDI.PM), or add it to U2 in the usual way (DeFine it, then issue
ADD2U2; run with AddDI).
XPLeNCODE v2.0
b-gin [UNTITLED]
{<}GL {>}[cr|lf]{{;5AddDI}} Embed Document Information in exi
sting file [CLD 9/6/07][cr|lf]{002}{<}LB {>}{<}IF{<}VA$WS{>}<
{062}1{>}{<}PRNo file{>}{<}EX{>}{<}EI{>}[XH_][BX_]es 1[Q2_][DX_];
*;[cr|lf]{<}SX01,{<}VA$WA{>}{>}{<}IF{<}PV01{>}<1{>}{<}PRNo wi
ndow{>}{<}EX{>}{<}EI{>}[BX_]func #{<}PV01{>}[Q2_];*;[cr|lf][B
X_]sa[Q2_]{<}SX01,{<}VAIO{>}{>}[BX_]d io=1[Q2_];*;[cr|lf]{<}S
X02,{<}VA$DT{>}{>}{<}IF{<}PV02{>}<1{>}{<}SX01,100{>}{<}EI{>}[
BX_]ne/{<}PV02{>}[Q2_];*;[cr|lf][AS_][BX_]wait[Q2_]{<}SX02,{<
}VA$FP{>}{>}{<}SX03,{<}CP{>}{>}[BF_]{<}SX04,{<}CP{>}{>};*;[cr
|lf][AS_][BX_]me {<}PV02{>}[Q2_][BX_]wait[Q2_];*;[cr|lf]{<}IF
{<}CP{>}<>{<}PV04{>}{>}{<}PRError while MErging file - No ope
ration{>}{<}EX{>}{<}EI{>};*;[cr|lf][BX_]ernv {<}PV02{>}[Q2_][
AS_][BX_]ab/nv[Q2_]{<}IF{<}VA$WS{>}<1{>}[BX_]rs[Q2_]{<}EI{>};
*;[cr|lf][BX_]jmp {<}PV03{>}[Q2_][BX_]sa {<}PV02{>}[Q2_][BX_]
wait[Q2_][BX_]d io={<}PV01{>}[Q2_];*;[cr|lf][DO_][FF_]{<}PRDo
cInfo added after EOF{>}{<}EX{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE
Hope this helps.
--
Carl Distefano
cld@xxxxxxxx