• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Change printer in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change printer in Leopard


  • Subject: Change printer in Leopard
  • From: Bart Mulier <email@hidden>
  • Date: Thu, 13 Dec 2007 13:52:48 +0100

Hi scripters,

anyone also have troubles for changing the current printer in Leopard (10.5.1)
When I change the current printer with Applescript,
It does not always print to the selected one...

Does anyone also have this problem?

thanks,
Bart Mulier

Here the script:
---------------------
global prn_list, prn_select, chosen_prn, chosen_file

tell application "Printer Setup Utility"
set AppleScript's text item delimiters to " , "
set prn_list to get name of printers as list
end tell

tell application "Finder"
activate
set prn_select to choose from list prn_list multiple selections allowed "no" with prompt "Choose your Printer which will print the labels !!" empty selection allowed "no"
end tell

tell application "Printer Setup Utility"
set chosen_prn to item 1 of prn_select --as string
set current printer to printer chosen_prn
end tell

tell application "Finder"
activate
set chosen_file to choose file with prompt "Select the PDF file"
print chosen_file
end tell



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Application responses, Timeouts, Try statements, Activate - how do they really work?
  • Next by Date: Cookies in Safari
  • Previous by thread: Change printer in Leopard
  • Next by thread: How do I know when an open "is finished to run" ?
  • Index(es):
    • Date
    • Thread