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

Very simple applescript Thread Tools Search this Thread Display Modes
Takes the (text) contents of the clipboard and puts each paragraph in its own box:

on run
set theText to get the clipboard
set theTextItems to every paragraph of theText
on error errStr number errorNumber
display dialog errStr
end try
tell application "OmniGraffle Professional 5"
set startingY to 20.0
repeat with aTextItem in theTextItems
tell canvas of front window
make new shape at end of graphics with properties {text:{alignment:left, text:aTextItem}, autosizing:full, origin:{100.0, startingY}}
end tell
set startingY to startingY + 30.0
on error errStr number errorNumber
display dialog errStr
end try
end repeat
end tell
end run

It's inspired by Jason Kunesh's great work on generating site maps

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me with a simple (I hope!) AppleScript! marissa OmniPlan Extras 0 2013-04-30 11:08 PM
Simple Applescript, Create Task, Assign resource, Assign dependency dexterama OmniPlan Extras 2 2012-11-18 12:25 PM
Probably very simple: I can't run the example TextEditor philipkd Omni Frameworks 2 2010-10-31 10:16 AM
Simple Applescripting Help anmpir OmniFocus Extras 2 2009-09-12 02:30 PM
Simple 'How to' re Contexts lfudold OmniFocus 1 for Mac 1 2008-02-08 11:14 AM

All times are GMT -8. The time now is 04:07 AM.

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