Skip to content

Instantly share code, notes, and snippets.

@galli-a
galli-a / zipshare_applescript_action_password
Created October 7, 2013 15:20
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
@galli-a
galli-a / zipshare_temporaryPath_variable
Created October 7, 2013 15:17
Keyboard Maestro updated `temporaryPath` assignment for "Zip & Share" macro
-qr %Variable%myPathToDropboxTempFolder%/%Variable%Days Available%/
@galli-a
galli-a / zipshare_applescript_action_nopassword
Created October 7, 2013 15:12
Keyboard Maestro updated AppleScript action for "Zip & Share" macro
tell application "Keyboard Maestro Engine"
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 " & temppath & quoted form of archiveName & ".zip " & quoted form of archiveName & " && rm -R " & quoted form of archiveName
do shell script command