[Coco] CoCo Email Test

K. Pruitt pruittk at roadrunner.com
Tue Jul 7 07:00:39 EDT 2015


Thanks Aaron. That is very helpful. I think I get it. I'll experiment.


----- Original Message ----- 
From: "Aaron Wolfe"
Sent: Monday, July 06, 2015 6:35 PM
Subject: Re: [Coco] CoCo Email Test


> 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.
>



More information about the Coco mailing list