automator question

i figured out how to setup automator workflows and an app (with all the workflows in it) that can backup and zip a specific set of folders on my mac and put them in specific locations.


automator allows me to create an archive - but using the macOS built-in archive utility only.


i like to use keka instead for creating password protected 7z archives of files/folders ... and i found the command that i need (compress using keka) has its own keyboard shortcut assigned (in system preferences/keyboard/shortcuts).


i want to create a workflow where i do this:


1-get specified finder items

2-copy finder items (to another folder)

3-invoke the keyboard shortcut on the folder i just copied, to compress using keka.


i keep keka open, with the settings and password i want to use and when i manually do a ‘compress using keka’ on a folder, it creates the archive and deletes the source folder when its done.


i am doing this manually for 3 or 4 folders of interest on my mac, and automator helps simplify but i cannot figure out how to get it to use keka instead of archive utility.


if i can do this another way, like create a script and turn it into an app, that also works. im not necessarily married to Automator.


grateful for any help to accomplish this ...

MacBook Pro 15", macOS 10.15

Posted on Feb 19, 2020 8:06 AM

Reply
25 replies

Feb 27, 2020 8:37 AM in response to zero7404

i ended up with 7 independent apps to do this entire job: delete old archives, copy folders to somewhere else and call keka to compress them and finally rename each 7z file.


i tried to get everything into a single app, but since automator feeds output of one step into another, i am getting bad results where copied and archived items are winding up in the folders of other workflows.


can i have a single app that executes apps inside it in sequence, and not dependent of eachother ?


right now to accomplish what i want, i have to basically run each app manually in order, or put them into individual calendar events and have them run one after another.

Mar 2, 2020 7:12 AM in response to Luis Sequeira1

how would the script be written out ... ?


would an app execute by using this code inside of a tell/end tell argument:


activate “xxyy.app”


if it’s that easy, then i can do that for all 7 apps i want to run, but need to do it in sequence ... i would probably specify a time delay between each app execution (wait xx seconds before executing the next app).


Mar 11, 2020 11:09 AM in response to Luis Sequeira1

my fundamental problem with automator workflows and apps is that of task overlaps that that led to results where one workflow’s output wound up as the input to another workflow if pause timing is not sufficient.


instead, the sure way i got what i needed was to make a single app specifically for each backup job from start to finish, with the appropriate pauses to ensure tasks dont start before the previous task is done. thats important when calling an outside app like keka to do an archive because the workflow does not care when keka finishes creating the archive.


so i have 3 separate apps that backup and archive 3 separate folders on my computer. they are independent of each other in a way where i can double click all 3 apps to run at the same time.


how could i script this ?

Feb 24, 2020 8:20 PM in response to Luis Sequeira1

i don't see anything called "control applications" anywhere in system preferences. in the full disk access and files and folders sections (in the security section) .... both of those windows have keka, automator, and the app i created listed and checked.


the applescript gets a green checkmark on it when i run the workflow, but no 7z file appears in the folder.

there must be a step that's missing, either in the script or within the workflow, that highlights/chooses the folder or file i want to do the keystroke on.


since this is not working i'm going to use the create archive task since it's there in automator.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

automator question

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.