• 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: 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


  • Follow-Ups:
    • Re: Can't seem to script printing PostScript file
      • From: "David B. Gustavson" <email@hidden>
  • Prev by Date: Re: undefined variable
  • Next by Date: Re: creator codes
  • Previous by thread: Can't seem to script printing PostScript file
  • Next by thread: Re: Can't seem to script printing PostScript file
  • Index(es):
    • Date
    • Thread