[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Using XyWrite file in Word and saving as text document
- Subject: Re: Using XyWrite file in Word and saving as text document
- From: Carl Distefano cld@xxxxxxxx
- Date: Wed, 29 Nov 2006 21:06:04 -0500
Reply to note from "Patricia M. Godfrey" Wed,
29 Nov 2006 12:52:02 -0500
Patricia:
> Oof! Yes, of course, my post of 11/22 included my version of
> the patched SA/RTF frame. My turn to go to the woodshed. Sorry,
> very sorry.
Please! No apology needed. I merely wanted to pinpoint the cause
of the failed conversion -- and to verify that my little routine
hadn't acquired paranormal powers of RTF detection. I suppose, to
make the program smarter, I could add a check to require that the
"{\rtf" flag occurs at Top of File before RTF format is assumed.
That would eliminate false positives of the kind that caused your
conversion to bomb. Yes, I should do that... Done!
XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5sa/rtf*,sa/htm*,sa/txt*,sa/xy*}} SAve file|DF block as RT
F|HTML|TeXt|XY4 (Xy4DOS only; uses XyShell if installed) [CLD
Rev.11/29/06][cr|lf]{002}[XH_][BX_]es 1[Q2_]{<}SX01,{<}VA@50
{>}{>}{<}IF{<}VA$VE{>}>"V4.099"{>}{<}PRXyWrite 4 (DOS) only{>
}{<}EX{>}{<}EI{>}{<}IF"\"{238}{<}VAWW{>}<0{>}{<}SX02,"Set DF{032}
WW in "+{<}VA$DL{>}{>}{<}PR@02{>}{<}EX{>}{<}EI{>}{<}IF{<}VA$W
S{>}<1{>}{<}PRNo file{>}{<}EX{>}{<}EI{>};*;[cr|lf]{<}IF{<}VA$
FI{>}=="[UNTITLED]"{>}[BX_]sa/nv UNTITLED.$FI[Q2_]{<}IF{<}ER{
{062}}{>}{<}SX02,{<}VA$ER{>}{>}{<}SX02,"{<}VA\"+{<}IS02{>}+"{>}"{
{062}}{<}SX02,{<}PV02{>}{>}{<}PR@02{>}{<}EX{>}{<}EI{>}[BX_]wait[Q
2_]{<}EI{>};*;[cr|lf][DZ_]{<}IF{<}VA$MO{>}>0&{<}VA$DE{>}<1{>}
{<}PRFile modified - SAve or ReCAll it before conversion{>}{<
}EX{>}{<}EI{>}{<}SX02,{<}VA$WA{>}{>}{<}IF{<}PV02{>}<1{>}{<}PR
No window{>}{<}EX{>}{<}EI{>}{<}PRWorking...{>}{<}SX03,{<}VA$F
P{>}{>}{<}IF{<}VA$WS{>}>1{>}{<}SX03,{<}VA$DR{>}{>}{<}EI{>}{<}
SV04,{>}{<}SX05,@upr({<}VA$FR{>}){>}{<}SV06,{>}{<}IF{<}IS05{>
}{240}"/NV"{>}{<}SV06,!{>}{<}SV07,/NV{>}{<}SV08,{>}{<}XS05,07
,09,,08{>}{<}SX05,{<}IS09{>}+{<}IS08{>}{>}{<}EI{>}{<}SX05,{<}
VA@05/2{>}{>}{<}IF{<}VA|05{>}>3{>}{<}SV07,{027}X{027}X{027}X{
{062}}{<}XS05,07,,07,08{>}{<}SX05,{<}IS07{>}{>}{<}EI{>};*;[cr|lf]
{<}SX50,{<}VA$KB{>}{>}[JM_]2.GetPath[Q2_]{<}SX09,{<}IS50{>}{>
};*;[cr|lf]{<}IF{<}VA$DE{>}>0{>}{<}SV04,TMP{>}{<}IF@siz({<}VA
@03.2{>})>0{>}{<}SX04,{<}VA@03.2{>}{>}{<}EI{>}{<}SX03,{<}IS09
{>}+"\SA!"+{<}IS05{>}+"."+{<}IS04{>}{>}[BX_]sad/nv {<}PV03{>}
[Q2_][BX_]wait[Q2_]{<}EI{>};*;[cr|lf]{<}SV07,17{>}{<}SV08,2{>
}{<}SV10,XY4{>};*; from Xy4 (or TeXT)[cr|lf]{<}IF{<}IS03{>}{2
40}".HTM"&{<}VA|06{>}<1{>}{<}SV07,108{>}{<}SV08,0{>}{<}S
V10,HTM{>}{<}EI{>};*; from HTML[cr|lf]{<}IF{<}IS03{>}{240}".R
TF"&{<}VA|06{>}<1{>}{<}SV07,19{>}{<}SV08,0{>}{<}SV10,RTF{>}{<
}EI{>};*; from RTF[cr|lf]{<}IF{<}VA$DE{>}<1&{<}VA$WS{>}==1&{<
}VA|06{>}<1{>}{<}SX50,{<}CP{>}{>}[TF_][BX_]se [wO][w
3][w9][wX]>[Q2_]{<}IF@not({<}ER{>}){>}[JM_]2.ReJuMP[Q2_]{<}SV
07,108{>}{<}SV08,0{>}{<}SV10,HTM{>}{<}EI{>};*; from HTML[cr|l
f]{<}IF{<}VA|06{>}<1{>}{<}SX50,{<}CP{>}{>}[TF_][BX_]se {\rtf
[Q2_]{<}IF@not({<}ER{>})&{<}CP{>}==5{>}[JM_]2.ReJuMP[Q2_]{<}S
V07,19{>}{<}SV08,0{>}{<}SV10,RTF{>}{<}EI{>}{<}EI{>}{<}EI{>};*
; from RTF[cr|lf]{<}SV11,19{>}{<}SV12,0{>};*; to RTF[cr|lf]{<
}IF{<}IS05{>}{240}"HTM"{>}{<}SV11,108{>}{<}GLa{>}{<}EI{>};*;{032}
to HTML[cr|lf]{<}IF{<}IS05{>}{240}"TXT"{>}{<}SV11,01{>}{<}GLa
{>}{<}EI{>};*; to TeXT[cr|lf]{<}IF{<}IS05{>}{240}"XY"{>}{<}SV
11,17{>}{<}SV12,2{>}{<}EI{>};*; to Xy4[cr|lf]{<}LBa{>}{<}SX50
,@upr({<}IS01{>}){>}{<}IF{<}IS50{>}=="/NV"{>}{<}SV50,{>}{<}EI
{>}{<}IF{<}VA|50{>}<1{>}{<}SX50,{<}IS09{>}+"\"+{<}IS10{>}+"2"
+{<}IS05{>}+"."+{<}IS05{>}{>}{<}EI{>}{<}IF"."{238}{<}IS50{>}<
0{>}{<}SX50,{<}IS50{>}+"."+{<}IS05{>}{>}{<}EI{>};*;[cr|lf][BX
_]ernv {<}PV50{>}[Q2_][BX_]wait[Q2_];*;[cr|lf][DX_][BX_]gofil
e {<}PV50{>}[Q2_]{<}IF@not({<}ER{>}){>}[BX_]ab/nv[Q2_]{<}EI{>
};*;[cr|lf][BX_]func #{<}PV02{>}[Q2_];*;[cr|lf]{<}SX02,{<}IS0
9{>}+"\W4WTEMP.BAT"{>}{<}SX09,"@echo off[cr|lf]"+{<}VAWW{>}+"
W4W"+{<}IS07{>}+"F.EXE "+{<}IS03{>}+" /n /v"+{<}IS08{>}+"[cr|
lf]"+{<}VAWW{>}+"W4W"+{<}IS11{>}+"T.EXE "+{<}IS50{>}+" /n /v"
+{<}IS12{>}{>}[BX_]sa %09,{<}PV02{>}[Q2_][BX_]wait[Q2_]{<}SX0
3,{<}IS50{>}{>}{<}SX50,{<}IS02{>}{>};*;[cr|lf];*; Conversion:
Use XyShell if installed (non-Win OSes only)[cr|lf]
{<}SV99,XyShell_Installed_Y|N{>}[JM_]2.RegData/N[Q2_]{<}IF@up
r({<}VA@99{>})=="Y"&"W"{238}{<}VA@652=2{>}<>0{>}[JM_]2.s2[Q2_
][JM_]2.AwaitDel[Q2_];*;[cr|lf]{<}LBb{>}{<}SX02,50000{>}{<}SX
04,"Waiting for "+{<}IS03{>}{>}{<}PR@04{>}{<}CUc,02{>}[BX_]ca
{<}PV03{>}[Q2_]{<}IF@not({<}ER{>}){>}[JM_]2.reca[Q2_]{<}PRSo
urce file is in alternate screen{>}{<}EX{>}{<}EI{>}{<}LBc{>}{
<}PR{012}Conversion failed{>}{<}EX{>}{<}EI{>};*;[cr|lf];*; El
se shell to DOS to convert[cr|lf][BX_]dos/nv/x/z /c {<}IF"W"{
238}{<}VA@652=2{>}==0{>}kmd.exe /c {<}EI{>}{<}PV02{>}[Q2_][BX
_]wait[Q2_];*;[cr|lf][BX_]p[Q2_][BX_]exist {<}PV03{>}[Q2_]{<}
IF@not({<}ER{>}){>}{<}GLb{>}{<}EI{>}{<}GLc{>}{002}[cr|lf][cr|
lf]
-nd
XPLeNCODE
--
Carl Distefano
cld@xxxxxxxx