StandardAdditions
has the path to
command and we can use it to get known locations.
For example, path to home folder
returns a file reference to the user folder
and if we want the posix path
, we can do POSIX path of ((path to home folder) as text)
.
In Terminal.app
we can use the tilde character (~
) to represent the home folder
.
How can we do this tilde expanding
in AppleScript
?
Started with
OS X 10.10
you can easily accessCocoa classes
and their functions and properties:In
10.9
you have to define such handlers inScripting Libraries
, that's less nice than it sounds. But in10.10
this works out of the box!