• 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: memory lapse
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory lapse


  • Subject: Re: memory lapse
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 13 Apr 2017 14:20:22 -0500

On 04/13/2017, at 14:07, Robert Poland <email@hidden> wrote:
set x to folder (~/dropbox/Bob Poland") as alias

OR set x to  (~/dropbox/Bob Poland") as alias

OR set aliasFolder to (path to folder (~/dropbox) & "Bob Poland") as alias


Hey Bob,

The only macOS app that understands tilde-based paths is System Events (outside of the Terminal).

------------------------------------------------------------------------------

tell application "System Events"
    set dropBoxPosixPath to POSIX path of disk item "~/Dropbox"
end tell

set dropBoxAlias to alias POSIX file dropBoxPosixPath

------------------------------------------------------------------------------

Then of course there's the normal method for creating a “relative alias”:

------------------------------------------------------------------------------

set dropBoxRelativeAlias to alias ((path to home folder as text) & "Dropbox:")

------------------------------------------------------------------------------

--
Take Care,
Chris

 _______________________________________________
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

References: 
 >memory lapse (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: memory lapse
  • Next by Date: Re: memory lapse
  • Previous by thread: Re: memory lapse
  • Next by thread: Relative-Alias Constructor Script – was memory lapse
  • Index(es):
    • Date
    • Thread