[Coco] CoCo Email Test

Aaron Wolfe aawolfe at gmail.com
Mon Jul 6 21:35:55 EDT 2015


Cool.  You can manipulate the driver definitions on the fly using dw
commands:

set current printer:

'dw conf set CurrentPrinter EmailThing'   (where EmailThing is the name
attribute of the printer you'd like to select)

list the available printer names:

'dw conf show Printer[@name]'

set the FlushCommand for a particular printer:

'dw conf set Printer(0).FlushCommand c:/something/email.bat
somebody at somewhere.com something..'

Note the number 0 in the command above... this is where things get a bit
tricky.  If you look closely at the output of any items that have multiple
entries, like:

dw conf show Printer.OutputDir

You'll see there are two answers (at least with the stock config file which
contains two printer definitions):

Printer.OutputDir = test, cocoprints

and the command earlier 'dw conf show Printer[@name]' also gave us two
answers seperated by a comma.

this is due to the weird way I sorted out arrays of sections, which is
based on the weird way the Apache Commons configuration libraries do it.
So the 0 in the set command is telling dw which printer in the array of
printer definitions to set the FlushCommand on.  I hope that makes some
sort of sense... if you have multiple Printers sections (or multiples of
anything else) then you set the items of a particular section using a zero
based index... i.e. to change the FlushCommand on the first printer section
you'd do:

'dw conf set Printer(0).FlushCommand something'

to set the same thing on the second printer section, you'd do:

'dw conf set Printer(1).FlushCommand something'

and so on.  you can have as many as you like.  they are sorted in the array
in the order they appear in the config.xml, or you can use the output of
the @name attribute to associate their human names with their index.

bleh, that turned out way longer and stranger than i'd hoped.  in a
nutshell, if you want to generate the flushcommands dynamically on the
coco, say from Basic09 or something, it's pretty easy once you grok the
weird config set syntax.  I believe Bill Pierce uses tricks like this with
the OutputFile setting to send files to various places in dw4man.  Same
trick could let you send emails to various people, etc.







On Mon, Jul 6, 2015 at 8:36 PM, K. Pruitt <pruittk at roadrunner.com> wrote:
> That was my first attempt after sending myself the same email to see if it
> worked. So I am sure the process could be refined quite a bit if someone
> really wanted to give the CoCo email capability.
>
> I see it more as a way for the CoCo to send the CoCo's operator a message
> than anything else. I'm just not sure why the CoCo would ever need to send
> me an email.
>
> "Hey, you forgot to turn me off! I'm 30 years old for crying out loud!"
>
> or
>
> "My thermistor has detected a temperature increase and I am switching on
the
> secondary cooling fan. I may now be spreading a fire! Wire a smoke
detector
> to me for crying out loud! I'm blind in here!"
>
> Darn cranky vintage computer systems.
>


More information about the Coco mailing list