Re: Creating alias programatically
Re: Creating alias programatically
- Subject: Re: Creating alias programatically
- From: "Michael Ash" <email@hidden>
- Date: Wed, 24 Sep 2008 10:19:17 -0400
On Wed, Sep 24, 2008 at 1:43 AM, Charles Srstka
<email@hidden> wrote:
> [source appendFormat:@"set theAlias to make alias at POSIX file \"%@\" to
> POSIX file \"%@\"\n", NSTemporaryDirectory(), originalPath];
Please never do anything like this. This will fail horribly if either
one of these two paths contains certain perfectly legal characters,
such as ". It's best to use something like the scripting bridge or
objc-appscript. If you must use AppleScript, then you should write
the script as a subroutine which takes the paths as parameters, then
invoke it using something like the code on this page:
http://www.cocoadev.com/index.pl?CallAppleScriptFunction
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden