When I refer to rich text, I am looking for better text editing capabilities rather than perhaps a strict definition a programmer or product manager might think of in relation to the term 'rich text.' A Mac OS X web server application for searching the contents of plain text, rich text, HTML formatted text, MS Word, PDF and any other textual file format supported by Spotlight.Boolean Search can be employed as a search engine for a public web site on the Internet, or a personal or group owned collection of files on your own computer or LAN. Automator can be set to accept rich text input from a text selection, or can input rich text from the clipboard, but I cannot find any way to access this rich text as a string within Automator or Applescript, such that I can then extract the hyperlinked URLs from the string of rich text data. It seems that only rich text content control is available. This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. New Rich Text Document.rtf - The default name given to new RTF files created via the Windows context menu (right click in a folder and choose New → Rich Text Document). FREE DOWNLOAD Open and view.RTF files with File Viewer Plus.
Active3 years, 11 months ago
I would like to be able to get a list of all the hyperlinked URLs in any formatted text that I select on the Mac (formatted text such as a web page or a word processor document).
https://informationheavenly.weebly.com/downloading-sublime-text-editor-for-mac.html. Preferably I'd like use Applescript or Automator to extract this list of hyperlinks from the text (so that I can then use Applescript to perform further processing on these URLs).
How to download text messages from iphone. Note that I am talking about hyperlinks being extracted from formatted text, not just extracting URLs from text containing plaintext URLs.
This hyperlink extraction from formatted text seems like it should be a simple programming task, but I have been struggling to find a way to do this in either Applescript or Automator.
Automator can be set to accept rich text input from a text selection, or can input rich text from the clipboard, but I cannot find any way to access this rich text as a string within Automator or Applescript, such that I can then extract the hyperlinked URLs from the string of rich text data.
Once I get access to the rich text data as a string, there will be no problem in extracting the URLs.
![How How](https://thegeeksclub.com/wp-content/uploads/2011/12/macosx102.png)
Any suggestions on how I might solve this issue are gratefully received.
user3638245user3638245
1 Answer
Applescript itself does not unpack embedded text, so you'll have to use a helper app one way or another. You can use do shell script 'textutil' to do some unimbedding of links: How to extract text from picture text boxes in word for mac.
Then, you'll have to extract the URLs. I would suggest using the Automator action 'Extract Data' to do this. If you set the whole thing up as an Automator Workflow, you could invoke it from Applescript. Or, if you save it as a Service, you can just run the whole thing from the Service. Here's a screenshot of that method that should show what you need:
Let me know if you have questions. You can see variations on this technique here.
Update:If you want to create this into a Service, it is difficult to coerce the built-in input from Automator into RTF. An effective method is to ignore the input and do a
to copy the selected text to the clipboard and then use the workflow from there. See example:
How To Search For Rich Text On Macbook
jweaksjweaksHow To Search For Rich Women On Facebook
3,03611 gold badge1212 silver badges2929 bronze badges
Rich Text Stationery
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.