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 > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Today's Posts

 
How do I create a hyperlink Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Quote:
Originally Posted by Sébastien View Post
Any idea to perform this action ? (Using an applescript maybe ? I have checked the applescript dictionary of OO, but i did not found the "link" keyword...)
For fairly deep and intractable architectural reasons Applescript can not really manipulate RTF text. If it were something that I really needed to do, and performance were not an issue, I might explore something like:
  • Capturing the RTF data from the OO row by placing its text in the clipboard, and extracting the raw rtf data from there.
    Code:
    set dataRTF to the clipboard as «class RTF »
  • Writing the RTF data out to a file
  • Converting the RTF file to HTML with a textutil command line
  • Performing some string operations on the HTML to wrap potential links with <a HREF tags
  • Converting the HTML back to RTF, again with textutil
  • Capturing the TextEdit RTF version (now with clickable links) into the clipboard
  • Replacing the OO row contents with the clipboard contents.

Maybe the OO mouse operation doesn't seem so bad now :-)

--

Last edited by RobTrew; 2010-10-31 at 12:43 PM..
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink to external info stmind OmniPlan General 5 2010-03-04 07:29 AM
Create date Laucha OmniFocus 1 for Mac 2 2010-02-21 06:50 AM
Create own polygon jochen OmniGraffle General 3 2009-06-30 10:32 AM
Getting a Hyperlink of the Last Sent Message from Mail.app using Applescript DataGazetteer OmniFocus Extras 1 2008-05-22 04:48 AM
Can't create new Folder catxtwo OmniFocus 1 for Mac 2 2007-11-21 09:26 AM


All times are GMT -8. The time now is 01:25 AM.


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