RE: Desktop Printeer manager & container
RE: Desktop Printeer manager & container
- Subject: RE: Desktop Printeer manager & container
- From: "Bourque, Jason" <email@hidden>
- Date: Wed, 29 Nov 2000 11:41:28 -0500
You need to add where it will be made default is the desktop
make new desktop printer at locationReference with properties
set this_printer to make new desktop printer with properties
,
{name:the DTP_name, is default:true ,
, container:the queue_folder ,
, PPD file:the PPD_file ,
, shows manual feed alert:false ,
, address:{class:address specification ,
, ID:the IP_address, protocol:IP, queue name:
Hope this helps
Jason Bourque
MFS Investment Management
>
----------
>
From: email@hidden
>
Sent: Wednesday, November 29, 2000 11:28 AM
>
To: email@hidden
>
Subject: Desktop Printeer manager & container
>
>
Dear Local Scripting Dieties,
>
>
I have been trying to use AppleScript to create dekstop printers in a
>
specific
>
folder on my Mac and have hit a snag. When attempting to use the
>
"container"
>
property from the Desktop Printer class to place the newly created
>
printer in a
>
specific folder, the printer is placed on the dekstop, not the
>
folder
>
specified.
>
>
Below is the code I have been using, any hints, suggestions or
>
clues
>
would be appreciated:
>
>
try
>
tell application "Desktop Printer Manager"
>
set IP_address to "129.219.167.200"
>
set DTP_name to "Stauffer 114"
>
set PPD_name to "HP LaserJet 4000 Series"
>
set queue_folder to "Macintosh HD:System Folder:Apple Menu
>
Items:Printers:" as alias
>
set the PPD_file to ((path to printer descriptions folder as
>
text
>
) & ,
>
the PPD_name) as string as alias
>
set the printer_driver to "LaserWriter 8"
>
>
try
>
set this_printer to make new desktop printer with
>
properties
>
,
>
{name:the DTP_name, is default:true ,
>
, container:the queue_folder ,
>
, PPD file:the PPD_file ,
>
, shows manual feed alert:false ,
>
, address:{class:address specification ,
>
, ID:the IP_address, protocol:IP, queue name:
>
DTP_name} ,
>
, driver name:the printer_driver}
>
on error the error_message number the error_number
>
if the error_number is not 128 then error the error_message
>
end try
>
>
set the PPD file of the default printer to the PPD_file
>
end tell
>
on error the error_message
>
display dialog the error_message buttons {"OK"} default button 1
>
end try
>
>
>
>
Michael C.