Quote:
That can definitely be done. Just as a start you could do something like
Code:
if left(@wksta,2) = 'FI'
; Finance Printer
endif
And i know a lot of people base their printer mapping off of ini files, so you could step it up a notch and have an ini file like maybe
Printers.ini
Code:
[FI]
DefaultPrinter=TheFinancePrinter
SecondaryPrinter=ABackupPrinterMaybe
[EN]
DefaultPrinter=TheEngineeringPrinter
SecondaryPrinter=TheirBackupPrinter
And then in your script something like
Code:
$dept = left(@wksta,2)
$defPrinter = readprofilestring("PathToIni",$dept,"DefaultPrinter")
$secPrinter = readprofilestring("PathToIni",$dept,"SecondaryPrinter")
I'm sure others here can provide more (better?) suggestions...
maciep,
I have a question about your script:
You identify $defPrinter as readprofilestring("PathToIni",$dept,"DefaultPrinter").
Would I then use the $defPrinter variable like this:
Code:
ADDPRINTERCONNECTION ("$defPrinter")