The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Applescripting Import and Export -> PNG to EPS Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
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!)

-- This droplet processes files dropped onto the applet 

on open these_items
	tell application "Finder"
		set saveFolder to desktop as string
	end tell
	end try
end open

-- this sub-routine processes files 
on process_item(this_item)
	tell application "OmniGraffle Professional 4"
		open document
		tell canvas 1
			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):

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
		save myDoc as exportType in exportFileName
	end tell
end tell
Any help, simple examples will be gratefully received.

Regards, Ian Grant

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to export and import to and from Onenote dwbrown77 OmniOutliner 3 for Mac 0 2012-12-26 04:46 AM
OO iPad - Sync vs Import/Export? [A: Import/Export; mail ninjas to request sync.] countdrachma OmniOutliner for iPad 6 2011-05-10 11:58 PM
Database export import not possible jochen OmniFocus 1 for Mac 2 2009-07-23 08:29 AM
SVG export/dot import Vincent22 OmniGraffle General 2 2007-01-10 03:24 PM

All times are GMT -8. The time now is 02:21 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.