Created
March 31, 2014 12:13
-
-
Save d108/9890979 to your computer and use it in GitHub Desktop.
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
-- Save the current audio recording from Sound Studio in lossless format. | |
-- This is an application specific script. | |
-- | |
-- @filename saveLosslessFromSoundStudio.scpt | |
-- @author Daniel Zhang (張道博) | |
-- Define the source path using a Mac OS type of path. | |
-- Example: drive-name:folder:subfolder | |
set myPath to "${MY_CUSTOM_AUDIO_PATH}" | |
set myRecordingApp to "Sound Studio" | |
set p to myPath as alias | |
set documentName to "audio-recording-lossless" | |
tell application "Finder" | |
set savePath to p & (documentName as text) as text | |
try | |
-- Assigning the application name to a variable didn't work. | |
-- So I'm hard coding it instead. | |
tell application "Sound Studio" | |
save front document in savePath as "Apple Lossless Audio" | |
end tell | |
on error | |
display alert "ERROR: Cannot save " & p & (documentName as text) & "." | |
end try | |
activate application "Sound Studio" | |
tell application "Sound Studio" | |
close front document | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment