• 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
Re: OS 10.6 Set Current Printer not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS 10.6 Set Current Printer not working


  • Subject: Re: OS 10.6 Set Current Printer not working
  • From: "Stockly, Ed" <email@hidden>
  • Date: Fri, 19 Mar 2010 10:59:26 -0700
  • Thread-topic: OS 10.6 Set Current Printer not working

Title: Re: OS 10.6 Set Current Printer not working


I'm using an AppleScript to change printers in a filemaker database and for some completely unbeknown reason to me, this script works in one file and not another.  I've tested this all on OS 10.6, FileMaker v10 and v11 and in both files I have full developer privileges.
 

This also worked for me on 10.4 using several apps.

See if the script below helps.

ES

tell application "Printer Setup Utility"
    
set
defined_printers to name of every printer
   set foundPrinter to the name of current printer
end tell

set
ChosenPrinter to choose from list defined_printers     with title "Select printer" with prompt foundPrinter &     " is  currently selected" default items foundPrinter     without multiple selections allowed
if ChosenPrinter is false then return
set
ChosenPrinter to ChosenPrinter as text
try
   repeat 3 times
       tell
application "Printer Setup Utility"
            
set the
current printer to printer ChosenPrinter
           set currentPRinter to the name of current printer
       end tell
       if
currentPRinter = ChosenPrinter then exit repeat
   end repeat
   if
currentPRinter is not ChosenPrinter then
       
display dialog "Could not change printer, please try to set it manually"
        
tell
application "Printer Setup Utility" to activate
   end if
   
on error
err_msg number err_num
   display dialog "Error #" & err_num & " - " & err_msg buttons "OK" default button 1
end
try

 _______________________________________________
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

References: 
 >OS 10.6 Set Current Printer not working (From: Denis Somar <email@hidden>)

  • Prev by Date: Re: OS 10.6 Set Current Printer not working
  • Next by Date: Re: AppleScript, Pages and Text boxes (part 1)
  • Previous by thread: Re: OS 10.6 Set Current Printer not working
  • Next by thread: RE: Osacript (solved)
  • Index(es):
    • Date
    • Thread