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

 
Applescript to collect text from selection Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Here's an AppleScript I use to collect all the text from multiple simple objects. This is handy when I've built up a sitemap as a diagram, and want to paste just the text into a spreadsheet.

It assumes the objects are arranged layer-wise in the order you want them.

Code:
tell application id "OGfl"
	tell front window
		set theSelection to the selection
		set numItems to length of theSelection
		set theText to ""
		repeat with itemNo from 1 to numItems
			set theText to theText & (text of item (numItems - itemNo + 1) of theSelection) & return
		end repeat
	end tell
	display dialog "The text:" default answer (theText as text)
end tell
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 03:00 PM.


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