Folder full of images you want to convert?
Wayne Brissette <[email protected]>
| Newsgroups | gmane.comp.graphics.omnigraffle.user |
|---|---|
| Message-ID | <14623251.1275422439742.JavaMail.root@mtwamui-mongrel.atl.sa.earthlink.net> |
If you ever have a folder full of images you want to convert, this AppleScript my come in handy. Open this up in the AppleScript Editor and save it as an application.
Then just drop a folder full of OG images (works on PDF, VDX, VSD, and graffle files. If OG ever supports opening svg or png this will also work for those). You can change the file types if you want. I wrote this for the one's I use and need to often convert.
Wayne
-- begin AppleScript
on run -- the script was run or the application was double-clicked
open (choose folder) as list
end run
on open DropFolder
set TID to AppleScript's text item delimiters
tell application "Finder"
set filetype_selection to the button returned of (display dialog "What type of export?" buttons {".png", ".pdf", ".svg"} default button 1)
set fullpath to POSIX path of DropFolder
set filelist to every item of folder DropFolder
repeat with CurrentFile in filelist
set currentFileName to (name of CurrentFile)
set AppleScript's text item delimiters to "."
set currentFileName to text item 1 of currentFileName as string
set AppleScript's text item delimiters to TID
set currentFileName to currentFileName & filetype_selection as string
set modfile to fullpath & currentFileName as string
tell application "OmniGraffle Professional 5"
open CurrentFile
save front document in modfile
close front document without saving
end tell
end repeat
end tell
end open
-- end AppleScript