Created
November 17, 2022 15:08
-
-
Save juandesant/fb825e6303e30837d900b17671700898 to your computer and use it in GitHub Desktop.
Creation of alias with some error management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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