I am looking for help in finding a script that will open all links I have have in all selected task’s note field.
I use one currently that will open 1 link from a tasks note field and will only open 1 url at a time - to clarify, the script I have is only capable of opening 1 task and in that task, it will only open the first URL.
I would like a script that can open all links in a task and open all links of all selected tasks (if I have 4 tasks selected)
Anyone know if this exists? This feature exists in 2do
I’ve only done minor testing on this but it seems to work. Give it a go and let me know.
tell application "OmniFocus"
tell content of first document window of front document
set selectedTasks to selected trees
if ((count of selectedTasks) < 1) then
display alert "You must first select tasks to search for links." message "Select a tasks from which you want to open links." as warning
repeat with taskNum from 1 to count of selectedTasks
set curTask to value of item taskNum of selectedTasks
set paragraphCount to count of paragraphs of note of curTask
if paragraphCount > 0 then
repeat with paragraphNum from 1 to paragraphCount
set curParagraph to paragraph paragraphNum of note of curTask
if text of curParagraph is not "" then
set curLink to value of attribute named "link" of style of paragraph paragraphNum of note of curTask
if curLink begins with "App:" then
set curLink to text 6 thru -1 of curLink as string
tell application target to activate
else if curLink contains "://" then
do shell script "open " & curLink
This works almost perfectly. If i select X amount of tasks whom’s note contains a URL, it will open them perfectly. The only error I am noticing is the script will open duplicate URL’s when a task contain’s multiple URL’s.
Example: If I have 1 ESPN link and 1 Facebook link, it will open 3-4 links.
I did some basic testing and it seems to only do this when there is an ‘enter’ break between lines. Anywho, in it’s current state it is better than what I had before and much appreciated, it saves me so much time in my workflow I am happy to donate some money your way. I noticed you had a $17 subscription so as my thanks, I will learn some more from ya and support your work.
Double check your note formatting and how the links are created. The only way I can duplicate this is with malformed formatting. Namely, if I have the url text in the note but it’s split in the middle with the same hyperlink added to two sides of the text.
I haven’t been able to replicate this at all. Is there something else unique to it?
I can’t find anything unique other than the two enter breaks between URL’s. I’ve tested on my Mac pro at home and my mac air at work. I can absolutely just be more mindful when inputting URL’s into notes and address this problem. If you are able to recreate the issue and adjust the script, let me know.
I often have too many tabs and windows open, and tried a few tab managers but didn’t like them. I had searched for this functionality to be done with OF3, and earlier had found a script that allows me to send all the tabs of a browser window to OF. What you’ve done here will allow me to send them back to the browser when I’m ready to work on that particular project or research. I won’t have to keep the tabs open in order to keep from losing track of whatever had inspired me.