Posts RSS Comments RSS 48 Posts and 155 Comments till now

Making an alias with AppleScript

This is a simple one but can be very useful.

To make an alias (shortcut) that points to another file you just need the path to file itself and the place you want the alias.

For this example we’ll make an alias of the Apple Mail program on the desktop the current user.

[codesyntax lang=”applescript” lines=”no”]
tell application “Finder” to make new alias at (path to desktop folder) to file ((path to applications folder as text) & “Mail”)
[/codesyntax]

That’s all there is to it. Remember to take advantage of the built in “path to” calls in the Standard Additions dictionary. In Script Editor go to “Open Dictionary” and choose “Standard Additions” from the list. Type “path” in the search box to find it quickly.

Comments are closed.