[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: Harry Binswanger hb@xxxxxxxx
- Date: Fri, 07 Sep 2007 00:55:10 -0400
Carl,
Thanks, but I don't want to use DI. I guess I should have given more
context. I've been recently doing some writing in Word (ugh!), for its nice
screen font. Hating Word (I lost an hour of work in it yesterday), I
decided to try NB 8, which uses the same screen-rendering that all Windows
programs do, so the type looks as beautiful as in Word.
I imported successfully my Word file into NB. Then I realized that the
"Last printed" running-header I used in Word wouldn't work in NB, so I was
looking for a work-around *for NB use*. I wrote a nice little program, in
Xy (not NB), to do the job (using JM 2.FileInfo). It worked well in Xy, but
I now realize you can't just transfer programs so easily between Xy and NB.
I'm having all kinds of Xy-NB "making the transition" problems--which are
not for this list to worry about.
(Well, maybe just one question . . . What was the main difference Robert
pointed out in regard to NB syntax? It was something you can't use in NB.)
So, I have my program that works for Xy, and I have to learn more about
Xy-NB differences before I can go further in NB.
Thanks for your help, and I think it's good that the DI stuff is going to
be added to U2, only I won't be using it myself.
--Harry
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
Harry Binswanger
hb@xxxxxxxx