• 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: Printing PS files from QuarkXPress
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing PS files from QuarkXPress


  • Subject: Re: Printing PS files from QuarkXPress
  • From: "Scott P. Richert" <email@hidden>
  • Date: Sun, 12 Jan 2003 21:09:34 -0600

Sorry to reply to my own post, but after several more hours of banging my head against the wall, I've become convinced that the problem involves coerced variables, and I'm hoping that rings a bell with someone.

Here's my reasoning:

Script #1:

set myFilePath to "Macintosh HD:Desktop Folder:"
set myFileName to myFilePath & "0000_0001.ps"

So myFilePath is set to string (implicitly), never coerced.

Script #2:

set myFilePath to (path to desktop as string)
set myFileName to myFilePath & "0000_0001.ps"

If you look at this in the events log, myFilePath is set directly to a string, never coerced.

Script #3:

set myFilePath to ((choose folder) as string)
set myFileName to myFilePath & "0000_0001.ps"

This one, in the event log, returns an alias, which is then coerced to a string when the variable is set. The QuarkXPress print command then fails, saying that some data cannot be made into the expected type. This is consistent with the much longer script that brought this problem to my attention, since I coerce a variable from an alias to a string, before concatenating it and sending it to the QuarkXPress print command. If I replace the coerced variable with "Macintosh HD:Desktop Folder:", the print command succeeds. (The print command, of course, takes a string; if I pass it an alias, I get a file not found error.)

My problem is that I really need to use Choose Folder, so I'm stuck with coercing the variable to a string. Any suggestions? Am I missing something?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Re: Union of sets (lists
  • Next by Date: Re: Union of sets (lists
  • Previous by thread: Printing PS files from QuarkXPress
  • Next by thread: Re: Printing PS files from QuarkXPress
  • Index(es):
    • Date
    • Thread