Skip to content

Instantly share code, notes, and snippets.

@evenv
Created July 2, 2012 20:13
Show Gist options
  • Save evenv/3035403 to your computer and use it in GitHub Desktop.
Save evenv/3035403 to your computer and use it in GitHub Desktop.
Export All OmniGraffle Files In A Folder To PDF
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