• 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
Wierdness converting path to file spec...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wierdness converting path to file spec...


  • Subject: Wierdness converting path to file spec...
  • From: Cliff Pruitt <email@hidden>
  • Date: Sat, 8 Oct 2005 21:22:07 -0400

Hey all...
Do any of you see a reason for this goofiness? I normally use aliases for everything but Adobe Illustrator requires a file specification when telling it which XML file to import for data driven graphics. So I specify my tmp file as a property (other parts of the script take care of building the XML file):


property tmpFilePath : "Macintosh HD:private:tmp:ccp_cd_print_datasorc.xml"

and then later I use it to load into Illustrator. However here's the weird part. The following code will fail:

tell application "Illustrator CS"
activate
try
set varFile to (file specification (tmpFilePath)) -- PROBLEM LINE
set activeDoc to document "CCPascoCDTemplate.ai"
import variables activeDoc from varFile
delay 1
display dataset "ccp_message_cd_print_data" of activeDoc
on error theErrInfo
display dialog theErrInfo as text
end try
end tell




I get the error:

Illustrator CS got an error: Cant get file specification "Macintosh HD:private:tmp:ccp_cd_print_datasorc.xml"

But if I move it out of the illustrator tell block like so:

try
    set varFile to (file specification (tmpFilePath))
on error errInf
    display dialog errInf
end try


tell application "Illustrator CS" activate try set activeDoc to document "CCPascoCDTemplate.ai" import variables activeDoc from varFile delay 1 display dataset "ccp_message_cd_print_data" of activeDoc on error theErrInfo display dialog theErrInfo as text end try end tell




it all works fine. Its working, so its not a huge issue, but anyone have a rational reason for the difference? It also fails if I put the line in any other tell block (for example system events).


More curiosity than anything.

Cliff

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Wierdness converting path to file spec...
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Paths & quoted form & do shell script
  • Next by Date: Re: Paths & quoted form & do shell script
  • Previous by thread: Re: Paths & quoted form & do shell script
  • Next by thread: Re: Wierdness converting path to file spec...
  • Index(es):
    • Date
    • Thread