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

Re: text to cmd line



In response to the question about getting text on the command line, this
was one of my first programming conundrums, and when I solved that I felt
like a kid who had gotten his first kiss, and was encouraged to pursue this
all the more.

Getting text on the command line is very easy.
I copy defined text to the command line all the time as part of several xpl programs I wrote probably 14 yrs ago. (I hate to admit I'm that old, btw.)

This is it:

«SV33»GH «PV33»
SV33 saves the defined text to saveget 33, then the GH function call (I think that's what we call it) "go to header" takes toggles the cursor to the command line where it was before, and then puts the string on the Command line.
I call this program "define.pm" and have it loaded in my startup.int file
to alt+5.

===
Which gets me to a very wonderful program I wrote at that time, which allow one to take the defined text and incorporate it into a search and replace routine. This program prompts you to choose whether the command should be CH (change), CV (change verify), or CI (change invisible). I think CI is nearly useless today with the high speed computers, but back then, when everyone was working on the old 088s then the ultra-superspeed ATs (288, I think) it was fun to watch the computer go through the changes in a long file. In those days we couldn't even comprehend how fast the 386s would be.
Now, I imagine this or parts of this program have incorporated into U2
(which I have not used yet, to my dismay). Nevertheless I include it here
because it is an extremely useful program for any editor and I use it
probably several times a day and all my Micro$oft colleagues are amazed to
watch it. Perhaps some Xy newcomers are unaware of this kind of potential.

====

I'm including the file as an attached item, as well as text below.
This program already presumes that the routine described above, "define.pm" is loaded to Alt+5.

«LBNote Change defined characters

 Save/Get Values
15 Escape
20 Receive Character
25 String chi
30 The letter H
35 The letter I
40 Subroutine to end

»«SV15,»«SV25,HIV»«SU40,XD BC p Program stopped
CH GT »«LBStart»BC Type
letter H, I, or V  ESC to
quit«SX20,«RC»»«SX20,@UPR(«IS20»)»«IF«IS20»==«IS15»»«GLEnd»
«EI»«IF«IS20»_«IS25»=>0»«GLRun»
«EI»«GLStart»
«LBRun»BC C«PV20» =@5 ==CL XD GT LU GH «EX1»
«LBEnd»«GT40»«EX1»






At 11:55 PM 11/5/01 -0500, you wrote:
I've already made some progress; converting
the f-ligs, the quote marks, and the em-dashes,
-- that all appears to be OK. Talking about it was
more upsetting than doing it. I realized that I
didn't need to know the commands to get
the weird characters into the command line,
since I was writing a program anyway -- I just
pasted them into the window where I was
writing the program. Everything seems to be
working well, though the text is still quite ugly,
and I wonder if there are other things I can do. I
realize that most people don't use Pagemaker
anymore. I used it because a very good designer
I knew was willing to design the book for me free,
but only on condition that it be done in Pagemaker
and, with the great 'book' features, I'm glad we
didn't do this large project in Quark.

Attachment: Define.chg
Description: Binary data