• 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: make new alias -- weird behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make new alias -- weird behavior


  • Subject: Re: make new alias -- weird behavior
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 15 Feb 2011 08:37:52 -0600

On Feb 15, 2011, at 8:04 AM, Joel May wrote:

The only way to create the alias is to use AppleScript talking with Finder.  

Here's the code:

tell application "Finder"
    set macSrcPath to POSIX file "/Applications/MyProduct/doodle/doodle.tag" as text
    set macDstFolder to POSIX file "/Library/Application Support/MyCompany/MyProduct" as text
    make new alias at folder (macDstFolder as text) to (macSrcPath as alias) with properties {name: "doodle.tag alias"}
end tell

This usually works, but it occasionally fails.  Here's what happens:

Try this first ...

tell application "Finder"
set macSrcPath to (((path to applications folder) as text) & "MyProduct:doodle:doodle.tag") as alias
set macDstFolder to (((path to application support from local domain) as text) & "MyCompany:MyProduct:") as alias
make new alias file at macDstFolder to macSrcPath with properties {name:"doodle.tag alias"}
end tell

Always use aliases, not text paths except where necessary.
Never use a posix path when a colon delimited path will work.

 _______________________________________________
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

  • Follow-Ups:
    • Re: make new alias -- weird behavior
      • From: Joel May <email@hidden>
References: 
 >make new alias -- weird behavior (From: Joel May <email@hidden>)

  • Prev by Date: make new alias -- weird behavior
  • Next by Date: Re: make new alias -- weird behavior
  • Previous by thread: make new alias -- weird behavior
  • Next by thread: Re: make new alias -- weird behavior
  • Index(es):
    • Date
    • Thread