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 > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
applescript to copy an OmniGraffle graphic? Thread Tools Search this Thread Display Modes
Can anyone show me an example of an applescript that copies an existing graphic to a new canvas?

Thanks!
ST
 
Code:
tell application id "OGfl"
	set lstSeln to (selection of front window)
	set oShape to first item of lstSeln
	
	tell front document
		duplicate oShape to end of graphics of canvas 2
	end tell
end tell
 
or, of course

Code:
tell application id "OGfl"
	set lstSeln to (selection of front window)
	set oShape to first item of lstSeln
	
	tell front document
		set oSecondCanvas to make new canvas
		duplicate oShape to end of graphics of oSecondCanvas
	end tell
end tell
 
I also tried doing this but do not have any result, I have encountered some technical problems
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem: copy as applescript | osascript - gshenaut OmniGraffle General 7 2013-01-30 03:16 PM
Bringing graphic objects to front in OmniGraffle mediaczar AppleScripting Omni Apps 3 2012-01-15 04:11 AM
AppleScript - How to Operate on Group of Selected Graphic Objects? trouble clef OmniGraffle General 1 2011-08-17 07:24 AM
Applescript help: Section copy Automating ptorngaard OmniOutliner 3 for Mac 3 2011-02-01 11:13 PM
Glitch in: Edit > Copy As > AppleScript RobTrew OmniGraffle General 0 2010-04-15 09:11 AM


All times are GMT -8. The time now is 09:14 AM.


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