• 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: Creating alias programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Creating alias programatically
      • From: Charles Srstka <email@hidden>
References: 
 >Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: Charles Srstka <email@hidden>)
 >Re: Creating alias programatically (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: How to track Slider's value while dragging the mouse?
  • Next by Date: Re: How to track Slider's value while dragging the mouse?
  • Previous by thread: Re: Creating alias programatically
  • Next by thread: Re: Creating alias programatically
  • Index(es):
    • Date
    • Thread