Re: AppleScript-Users Digest, Vol 5, Issue 244
Re: AppleScript-Users Digest, Vol 5, Issue 244
- Subject: Re: AppleScript-Users Digest, Vol 5, Issue 244
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 17 Apr 2008 16:55:34 -0700
- Thread-topic: AppleScript-Users Digest, Vol 5, Issue 244
>>>How do I get Illustrator to resolve the alias to a file?
Keep in mind, this is deceptively complex. First, you have an illustrator
file, the orginal item of the alias file your script sees. Second you have
the alias file itself, which is a Finder item that points to the original
item. Then you have the appleScript class "alias" which is a way for
applescript to refer to any file, folder or alias on the mac. In this case
it refers to the alias file, but some commands that reference an alias will
provide information about the original file.
Finally, you may have situations where the original file is no longer
available. (it's been deleted or it's volume isn't mounted).
Try something like this, which uses the Finder to resolve the alias file.
on ResolveAlias(aliasFile)
tell application "Finder"
try
return (original item of aliasFile) as alias
on error
--alias can't be resolved
return aliasFile
end try
end tell
end ResolveAlias
Repeat with thisFile in listOfFiles
Set myFile to resolveAlias(thisFile)
Tell application "Illustrator" to open myFile
End repeat
>>Can I pass parameters to Illustrator via the shell script option?
Try it and see, I kind of doubt it. You probably won't hurt anything:
Tell application "Illustrator" to open myPosixFile
>>>Am I going about this entirely wrong?
No, you're on the right track.
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden