• 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
Can't seem to script printing PostScript file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't seem to script printing PostScript file


  • Subject: Can't seem to script printing PostScript file
  • From: "David B. Gustavson" <email@hidden>
  • Date: Mon, 30 Jul 2001 15:31:45 -0700

I need to print a PostScript file that I generate through a complicated process.

If I drag the file manually onto my desktop PostScript printer, it prints fine.

I want to script the process. The following script is essentially identical to one that works for someone else (thanks, Joshua!), but it won't work for me. I've inserted comments to show the progress.

Can you see anything I ought to try? Is there another approach that might work?
Joshua also suggested I try recording, but the important stuff doesn't get recorded, so that didn't help:

tell application "Finder"
activate
select item "LaserJet 5" --succeeds
open selection --succeeds
select item "SFCU.ps" of folder "Forms" of startup disk --succeeds
--this works for others if the file is on the desktop, but it
-- doesn't work for me if it is in a folder elsewhere, or if the file is on the desktop either.
-- This version copies the file to the desktop just to duplicate the other guy's successful setup.
duplicate selection to desktop of startup disk with replacing --succeeds
select item "SFCU.ps" of desktop -- succeeds
--delay 10 --does not help, was suggested by one scripter who suspected finder sluggishness problem
move selection to item "LaserJet 5" --Error -1753
close container window of item "LaserJet 5"
end tell


Error -1753 is something I've never been able to find any clue about--I have no idea what makes this statement unhappy. I've searched widely and even asked Black&Bleu without any luck.


  • Prev by Date: Re: Script crashes Script Editor; Scripter launch locks up 9.1 Mac solidly
  • Next by Date: Re: undefined variable
  • Previous by thread: Re: undefined variable
  • Next by thread: Can't seem to script printing PostScript file
  • Index(es):
    • Date
    • Thread