Skip to content

Instantly share code, notes, and snippets.

@galli-a
Created October 7, 2013 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save galli-a/6869720 to your computer and use it in GitHub Desktop.
Save galli-a/6869720 to your computer and use it in GitHub Desktop.
Keyboard Maestro updated AppleScript action for "Zip & Share" macro
tell application "Keyboard Maestro Engine"
set zipPassword to (process tokens "%Variable%myPass%")
set archiveName to (process tokens "%Variable%archiveName%")
set fileNames to (process tokens "%Variable%fileNames%")
set originalPath to (process tokens "%Variable%filePath%")
set temppath to (process tokens "%Variable%temporaryPath%")
set command to "cd /tmp && mkdir " & archiveName & " && cp -R " & fileNames & " " & quoted form of archiveName & " && zip --password " & zipPassword & temppath & quoted form of archiveName & ".zip " & quoted form of archiveName & " && rm -R " & quoted form of archiveName
do shell script command
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment