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


Carl, I'm attaching the little program I use to switch printers. I've annotated
it so that you can follow the programming statements in English.

For those who don't see the attached file, the idea is that creating a line in
my printer file that says DF HN=10 causes the normal header to be displayed as
green on my color monitor for one printer and a line in the other printer file
that says DF HN=14 causes it to display the normal header as a yellow color. By
looking at the color of the top line of my display, I can figure out which
printer driver is currently in use.

No sense in entering a va command on the command line unless you want to insert
the result in the text file you are working on. The program measures the
current default value of hn during its execution.

The set up on my desk is one computer attached to 2 printers (a dot matrix for
multiple copy forms and a laser for everything else) via a mechanical a-b
switch. I recently asked this BBS group for some advice about this sort of
set-up. Either they were content to let me be stupid, or were equally stupid (I
got no response). Believing the latter to be a more charitable interpretation,
here's what I've recently heard/read on the subject:

The rotary switch in a mechanical a-b switch opens and closes by scraping metal
against metal. This action within the switch creates the potential for an
electrical arc or spark to be sent thru the parallel cable to the laser and
damage some delicate electronics.

An electronic switch called "Bothway" is available thru Computer Friends (the
Mac-Inker people) for about $90 + shipping. It takes 3 db-25 connections and
has its own power supply. A software command setting an environment variable
called PORT to either B or C activates the switching mechanism. The guy who
tried it out in my local users group was unhappy with it because the CPU within
the switch ran at a clock rate substantially slower than his machine and caused
real delays in sending softfonts and files to his printer.

His workaround (now mine also) was to turn off the laser before switching the
a-b switch, and then turn it back on. I love pushing buttons. Simple enough for

So much for printers. Here's the syntax for the EXIST ALL part of your message:

BC exist all > 

BC yes it does exist BC no it doesn't exist

If you want to learn the XPL language you have to do it in spite of XyQuest's
insistence that their product is a word processor. The people who wrote it put
some powerful tools in it. (what business does a word processor have measuring
environment variables like hn if not to program some sort of action based on
the value? eh?) I find I learn most by dissecting the work of others. Your
master copy of XyWrite contains a file called config.int which is a perfect
place to start taking things apart. (after all, an xpl program configured your
system the first time you installed this baby) The help file will enlighten you
as what the various function look like in an XPL file.

Once you know the language, you have to examine your own procedures in minute
detail to write something that works properly for you. But once thru all the
pitfalls and frustrations of programming in XPL you'll find this software will
do everything except make your coffee in the morning. Cheers.

*Enclosed File: ctlo.e