|
That looks like a fun one. Since we allow our users to point to their own printers, this is out of my area of expertise. However, a couple of things come to mind immediately:
1. You could clean up the code a bit with a select statement.
SELECT CASE InGroup('WELGN') SetDefaultPrinter('welgn01') CASE InGroup('Lsbprt') SetDefaultPrinter('lsb01') . . . ENDSELECT
If I understand the internals of the SELECT statement, this would also speed up the script in most cases, since no more CASEs are evaluated once a true one is executed. This would eliminate a lot of InGroup() tests.
Also, I notice that the printer names are *almost* standardized with the group names. If your organization was willing to do a little more standardization, you could put the names into an array and loop through the group/printer assignments.
New Mexico Mark [ 29 March 2002, 21:32: Message edited by: New Mexico Mark ]
|