Instantly share code, notes, and snippets.
galli-a
/ zipshare_applescript_action_password
Created
October 7, 2013 15:20
Keyboard Maestro updated AppleScript action for "Zip & Share" macro
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 "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
/ zipshare_temporaryPath_variable
Created
October 7, 2013 15:17
Keyboard Maestro updated `temporaryPath` assignment for "Zip & Share" macro
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
-qr %Variable%myPathToDropboxTempFolder%/%Variable%Days Available%/ |
galli-a
/ zipshare_applescript_action_nopassword
Created
October 7, 2013 15:12
Keyboard Maestro updated AppleScript action for "Zip & Share" macro
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 "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 |