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: JJ <email@hidden>
- Date: Tue, 31 Jul 2001 09:04:26 +0200
>
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
>
"move" command isn't a "drag & drop" transaction.
You can "move" an object to a location (not onto other object -item)
What about
tell application "Desktop Printer Manager" to (opt+L)
set default printer to desktop printer "LaserJet 5"
tell application "Finder" to (opt+L)
print alias "HD:Desktop Folder:PrintJobs:My.ps"
JJ