Skip to content

Instantly share code, notes, and snippets.

@juandesant
Created November 17, 2022 15:08
Show Gist options
  • Save juandesant/fb825e6303e30837d900b17671700898 to your computer and use it in GitHub Desktop.
Save juandesant/fb825e6303e30837d900b17671700898 to your computer and use it in GitHub Desktop.
Creation of alias with some error management
tell application "Finder"
try
make new alias to POSIX file "/System/Applications/Automator.app" at POSIX file "/System/Applications/Automator.app" with properties {name:"Alias to Automator"}
on error errorMsg
make new alias to POSIX file "/System/Applications/Automator.app" at (path to downloads folder) with properties {name:"Alias to Automator.app"}
end try
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment