Created
July 2, 2012 20:13
-
-
Save evenv/3035403 to your computer and use it in GitHub Desktop.
Export All OmniGraffle Files In A Folder To PDF
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 "Finder" | |
set the theFolder to choose folder with | |
"Pick a folder containing the OmniGraffle files you want to export to PDF:" | |
set theList to every file of the theFolder whose | |
name extension is "graffle" | |
end tell | |
repeat with theFile in theList | |
set theOutFile to ((do shell script "basename \"" & (theFile) & "\"" & " .graffle") & ".pdf") | |
set theInFile to theFile as string | |
tell application "OmniGraffle Professional 5" | |
activate | |
open file (theInFile) | |
save front window in file theOutFile | |
close front window | |
end tell | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment