Can't seem to script printing PostScript file
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.