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 Today's Posts

 
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
try
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
try
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
 
 




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


All times are GMT -8. The time now is 04:20 PM.


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