Is it possible to have an Automator application launch an AppleScript. I know that it possible to add scripts to an Automator application, but for some reason that is not working when I insert a script that triggers a Notification. So, if the script is in a folder somewhere in my Documents folder, how would I trigger Automator to run an external script, if that is even remotely possible?
You can save the script as application and just launch
it,
or in case of a compiled script you can add an AppleScript action which contains load script
and run
code
But you can perform the notification also in Automator.
I’m trying to accomplish something pretty specific, and I’m probably way over thinking things as well.
The first part of the Automator application is a bin/zsh Run Shell Script as follows.
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Documents\ Archive/Documents_$(date +\%Y-\%m-\%d) --delete /Users/homer/Documents/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Documents
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Dropbox\ Folders\ Archive/Local\ Dropbox\ Folders_$(date +\%Y-\%m-\%d) --delete /Users/homer/Library/CloudStorage/Dropbox/Local\ Folders/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Dropbox\ Folders
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Installs\ Archive/Installs_$(date +\%Y-\%m-\%d) --delete /Volumes/Installs\ HD/MacBook\ Pro\ Installs/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Installs
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Movies\ Archive/Movies_$(date +\%Y-\%m-\%d) --delete /Users/homer/Movies/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Movies
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Music\ Archive/Music_$(date +\%Y-\%m-\%d) --delete /Users/homer/Music/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Music
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Photos\ Archive\ Archive/Photos\ Archive_$(date +\%Y-\%m-\%d) --delete /Users/homer/Photos\ Archive/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Photos\ Archive
rsync -a -b --backup-dir=/Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Pictures\ Archive/Pictures_$(date +\%Y-\%m-\%d) --delete /Users/homer/Pictures/ /Volumes/MacBook\ Pro\ Local\ Backups/Sync\ Folders\ Local\ Backups/Local\ Pictures
So I’m thinking that if I can make that into a do shell script AppleScript I’d be set, as the second part of the Automator application is a simple AppleScript that prunes the Archive folders of any file older than 90 days.
I’ve tried to add an AppleScript to the Automator application to show a Notification once the Automator is done, and it shows up the first time it’s run, then never again. I’ve also tried the Automator show notification thing, and that doesn’t work at all.
I’m interested in the “load script and run code” as I’ve never used that before. Any further explanation on how to accomplish that?
In this thread it’s described how to load and run scripts, you can just omit the parameters