Re: memory lapse
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
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:")
------------------------------------------------------------------------------
|
_______________________________________________
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>) |