[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Another strange macro request...



Reply to note from "Yo Intl. YK"  Tue, 17 Sep 2002
13:01:24 +0900

> I have to files (computer files, very structured). One in
> language A, the other in language B. The number of lines is
> identical. Now what I need to produce is one combined file
> which contains langage A and language B alternatingly.

Put File A in the current window, File B in the alternate window,
and RUN this routine (decode it first, with DECODE, and
save it to a file):

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SX01,{<}VA$WA{>}{>}{<}IF{<}PV01{>}<1{>}{<}PRNo window avai
lable{>}{<}EX{>}{<}EI{>}[TF_]{<}SX02,{<}VA$WN{>}{>}[AS_][TF_]
{<}SX03,{<}VA$WN{>}{>}[BX_]func #{<}PV01{>}[Q2_][BX_]ne/100[Q
2_][BX_]func #{<}PV03{>}[Q2_][BX_]func #{<}PV02{>}[Q2_][DX_];
*;[cr|lf]{<}LBa{>}{<}IF{<}VA$FE{>}<1{>}[DO_][DX_][DL_]{<}SV04
{>}[YD_][AS_][DL_]{<}SV05{>}[YD_]{<}SX04,{<}IS04{>}+{<}IS05{>
}{>}[BX_]func #{<}PV01{>}[Q2_]{<}GT04{>}[AS_][BX_]func #{<}PV
02{>}[Q2_]{<}GLa{>}{<}EI{>}[BX_]func #{<}PV01{>}[Q2_][TF_]{<}
PRDone{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

Speaking of macro requests, here's the latest (and probably last)
revision of LISTWDS:

XPLeNCODE v2.0
b-gin [UNTITLED]
{listwds,listwdsa}[cr|lf][cr|lf]LISTWDS.PM C.L.Distefano rev
{046} 9/12/02[cr|lf]For XyWrite 4|XyWrite for Windows|NotaBene fo
r Windows[cr|lf][cr|lf]List words in current file that contai
n a specified string[cr|lf][cr|lf]Usage (with subject file in
 current window):[cr|lf] List words containing instring:  {032}
 LISTWDS[A] [instring][cr|lf] List words _starting
_ with instring: LISTWDS[A] [instring]*[cr|lf] List
 words _ending_ with instring:  LISTWDS[A] *[instring][cr|lf] List words with internal instring:  LISTWDS[A] *
[instring]*[cr|lf] List hyphenated words:     {032}
   LISTWDS[A] -[cr|lf] List ALL words in current{032}
file:   LISTWDS[cr|lf] Allow duplicates in list:
      LISTWDS[A]/NV [instring][cr|lf] Usage r
eminder:           LISTWDS ?[cr|lf][cr|lf
]Notes:[cr|lf]1) Framename LISTWDSA performs a case-Absolute{032}
search.[cr|lf]2) To include footnotes, formatting commands an
d other embedded material in the word list, the subject file{032}
must be displayed in eXPanded view (command: FUNC XP) before{032}
running LISTWDS.[cr|lf][cr|lf]{<}FC{>}[cr|lf]For use with REN
UMBER.PM:[cr|lf]Default Save/Get range = 01-09; 50[cr|lf]Renu
mber LISTWDS in PACK mode[cr|lf]OPTIONs (1): FREEZE 50[cr|lf]
{<}FL{>}[cr|lf]{<}LD={>}[cr|lf][cr|lf]{{;5listwds*}} List wor
ds in current file that contain a specified string [CLD rev.{032}
9/12/02][cr|lf]{002}[XH_][BX_]es 1[Q2_]{<}IF{<}VA@50{>}=="?"{
>}{<}PRLISTWDS[A][/NV] [*]instring[*]{>}{<}EX{>}{<}E
I{>}{<}IF{<}VA$WS{>}<>1{>}{<}PRNo file{>}{<}EX{>}{<}EI{>}{<}I
F{<}VA$WA{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}{<}IF{<}VA|
50{>}<1{>}{<}SV50,[wA]{>}{<}EI{>}{<}SX01,{<}IS50{>}{>}{<}IF{<
}IS50{>}{240}"*"{>}{<}IF{<}VA@50*2{>}{238}{<}IS50{>}==1&@siz(
{<}VA@50*2{>})=={<}VA|50{>}-2{>}{<}SX01,{<}VA@50*2{>}{>}{<}SX
50,"[wA]"+{<}VA@50*2{>}+"[wA]
"{>}{<}GLa{>}{<}EI{>}{<}SV02,*{>}{<}XS50,02,02,,03{>}{<}IF"*"
{238}{<}IS50{>}=={<}VA|50{>}-1{>}{<}SX50,"[wS]"+{<}IS02{>}{>}
{<}SX01,{<}IS02{>}{>}{<}GLa{>}{<}EI{>}{<}SX50,{<}IS03{>}+"[wS
]"{>}{<}SX01,{<}IS03{>}{>}{<}LBa{>}{<}EI{>}{<}IF{<}IS50{>}=="
-"{>}{<}SV50,[wL]-{>}{<}SV01,-{>}{<}EI{>}{<}SX02,{<}VA$WA{>}{
>}[BX_]func #{<}PV02{>}[Q2_][BX_]ne/1[Q2_][AS_]{<}IF{<}VA$DT{
>}>0&{<}VA$DT{>}<>8{>}[WG_]{<}IF{<}VA$DT{>}>1{>}[MK_]{<}EI{>}
{<}EI{>}[TF_][TF_][XD_][XD_][XD_][YD_]{<}SV02,{003}{008}{tab}
 "()+,-/:;<=>[\]^`{|}~{158}{<}{>}{176}{177}{178}{179}{180}{1
85}{186}{187}{188}{191}{192}{193}{194}{195}{196}{197}{200}{20
1}{202}{203}{204}{205}{206}{217}{218}{219}{220}{221}{223}{238
}{239}{240}{241}{242}{244}{245}{246}{247}{248}{249}{250}{>}{<
}SV04,{>}{<}IF@upr({<}VA$FR{>}){240}"A"{>}{<}SV04,a{>}{<}EI{>
}[DX_]{<}SX03,"Listing all words in "+{<}VA$FP{>}{>}{<}IF{<}I
S50{>}<>"[wA]"{>}{<}SV05,contain{>}{<}IF"[wS]"{238}{<}IS50{>}
==0{>}{<}SV05,start with{>}{<}EI{>}{<}IF({<}IS50{>}+"[255+192
+142]"){240}"[wS][255+192+142]"{>}{<}SV05,end in{>}{<}EI{>}{<
}SX03,{<}IS03{>}+" that "+{<}IS05{>}+" """+{<}IS01{>}+""""{>}
{<}EI{>}{<}PR@03{>}{<}LBb{>}{<}SX05,-1{>}[BX_]se{<}PV04{>} [9
99]{<}PV50{>}[999][Q2_]{<}IF@not({<}ER{>}){>}[CL_]{<}LBc{>}[D
W_]{<}SV03{>}{<}IF({<}IS03{>}+"[255+192+142]"){240}"-[255+192
+142]"{>}{<}IF{<}VA|03{>}-{<}PV05{>}>1{>}{<}SX05,{<}VA|03{>}{
>}{<}GLc{>}{<}EI{>}{<}EI{>}[YD_]{<}LBd{>}{<}SX05,{<}IS03{>}+"
[255+192+142]"{>}{<}SV06,{027}X[255+192+142]{>}{<}XS05,06,06,
07,08{>}{<}SV08,{027}X{>}{<}XS07,08,,08,09{>}{<}IF{<}IS02{>}{
240}{<}IS08{>}{>}{<}SX03,{<}IS06{>}{>}{<}GLd{>}{<}EI{>}{<}IF{
<}IS03{>}<>"[cr|lf]"{>}[AS_]{<}GT03{>}[255+048+068]
[DO_][DX_][AS_]{<}EI{>}{<}GLb{>}{<}EI{>}[AS_]{<}SV02,{>}{<}SV
03,{>}{<}IF{<}CP{>}<1{>}[BX_]ab/nv[Q2_]{<}IF{<}VA$WS{>}<1{>}[
BX_]rs[Q2_]{<}EI{>}{<}SV02,0{>}{<}GLe{>}{<}EI{>}[DF_][TF_][TF
_][DF_]{<}IF"/"{238}{<}VA$FR{>}<0{>}{<}SX02,{<}VA$SK{>}{>}{<}
SX02,"[BX_]d sk="+{<}IS02{>}+"[Q2_]"{>}[BX_]d sk=4,80[Q2_]{<}
SV03, unique{>}{<}EI{>}[BX_]sort/nv[Q2_][BX_]wait[Q2_]{<}PV02
{>}[TF_][TF_][AS_][TF_][TF_][AS_][BX_]ch [wC] [wC][Q2_][BX_]
wait[Q2_]{<}SX02,{<}VA$WC{>}{>}{<}LBe{>}{<}SV05,{>}{<}IF{<}PV
02{>}<>1{>}{<}SV05,s{>}{<}EI{>}{<}SX02,{<}IS02{>}+{<}IS03{>}+
" word"+{<}IS05{>}{>}{<}IF{<}IS50{>}<>"[wA]"{>}{<}SV05,contai
ning{>}{<}IF"[wS]"{238}{<}IS50{>}==0{>}{<}SV05,starting with{
>}{<}EI{>}{<}IF({<}IS50{>}+"[255+192+142]"){240}"[wS][255+192
+142]"{>}{<}SV05,ending in{>}{<}EI{>}{<}SX01,{<}IS02{>}+" "+{
<}IS05{>}+" """+{<}IS01{>}+""""{>}{<}EI{>}{<}PR@01{>}{002}[cr
|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/