Hello all,
OG Version: OmniGraffle 4.2.3
I am not a fluent applescripter - so please bear with me if there are obvious solutions to these problems:
I've tested the export scripts on the various threads on this forum -
Export thread - but commonly receive errors when exporting to EPS.
I wish to make a droplet that will process dopped PNG screenshots (with transparency) to EPS (with transparency), maybe saving the graffle document along the way. One graphic per canvas.
Here's a simple import PNG/other-graphics-format script (currently not working!)
Code:
-- This droplet processes files dropped onto the applet
on open these_items
tell application "Finder"
set saveFolder to desktop as string
end tell
try
process_item(these_items)
end try
end open
-- this sub-routine processes files
on process_item(this_item)
tell application "OmniGraffle Professional 4"
activate
open document
tell canvas 1
activate
import (this_item)
end tell
end tell
end process_item
I see the IMPORT dictionary docs have numerous parameters - I would love a simple example showing how this works.
Here's my current export script (greatly simplified from the other examples). I will tie them together when I get my head around the basic simple functionality. Even when testing the working export scripts e.g.
See SteveF's script and changing PNG export to EPS, the scripts fails with:
OmniGraffle Professional 4 got an error: The document cannot be saved in the "eps" format.
Are there additional export settings I need to set to export to EPS: Here's a simple (non working example):
Code:
tell application "OmniGraffle Professional 4"
set myWindow to front window
set myDoc to document of myWindow
set export_folder to (choose folder with prompt "Pick the destination folder") as string
set exportType to "EPS"
set exportFileExtension to "eps"
set exportFileName to export_folder & "myFile" & "." & exportFileExtension
set include border of current export settings to false
set copy linked images of current export settings to false
set area type of current export settings to selected graphics
set draws background of current export settings to false
--set export scale to "100.0" -- not sure of what a 'real' is applescript - a decimal?
tell front document
activate
save myDoc as exportType in exportFileName
end tell
end tell
Any help, simple examples will be gratefully received.
Regards, Ian Grant