Anthony pretty much nailed how we're doing it.
But my original question is still unanswered.
I want to make sure it's a valid printer before I start printing to it.
I think I problably need to do something like
EXECUTE "DOS /C [some-command] \\MY_PRINT_SERVER\PrinterName"
CAPTURING DOSMSG
IF DOSMSG = [something bad] THEN . . .
I was hoping someone in this august body had crossed that bridge before.
cds
On 1/28/2014 11:31 PM, Jeff Schasny wrote:
I've been using Universe since it was in beta and I had no idea you
could use a URI in SETPTR.
Its a good day, I've learned something new. Thanks!
Wols Lists wrote:
So if I am working on \\ASHDOWN (the name of my computer) I can use
SETPTR to point at \\TIGGER\HP - a printer logically connected to a
different computer that I've never told UV anything about.
Setptr is quite happy to be given a windows remote computer reference
and it works fine. That was how all our printers worked - they usually
had network cards in them, so when a new printer turned up, I would
assign it a name in DNS, and for anybody who was supposed to use it I
would just edit their login script to add eg
SETPTR ...,AT \\ACCOUNTS-HP\RAW
And it just worked. No UV printer setting up whatsoever. Okay, my setup
was a little bit cleverer than that, but everything, and I mean
EVERYTHING, was done in my programs. Nothing at the UV level whatsoever.
Cheers,
Wol
Correct. Except he was *also* using the URI syntax, ie
\\COMPUTER\QUEUE.
Wols Lists wrote:
On 28/01/14 15:07, Jeff Schasny wrote:
SPOOL -LIST will show you all the print queue names
Is that all the printer names known to U2, or all the printer names
known to the network?
In Chuck's example, this particular printer will never have been
declared to U2 - I did this all the time. The only printer UV was told
about was DEFAULT, which didn't exist ...
In fact, I suspect this syntax will list all the printers known to the
server on which U2 is running, which could easily NOT include a valid
printer the user is trying to print to ...
Cheers,
Wol
Charles Stevenson wrote:
SETPTR 0,80,60,3,3,1,AT \\BAD\NAME
seems to execute w/o throwing an error.
but an actual PRINT statement yields a fatal error:
Program "PRT": Line 2, Printer name \\BAD\PRINTERNAME is not
recognized by the system.
I'd like to verify we're printing to a good printer *before*
attempting to do so.
Execute some DOS command, maybe?
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users