I'd like to find all links to DEVONthink references in notes of OmniFocus projects or tasks. There seems to be no direct method in getting link destinations other than checking each note separately. The following script snippet does work, however, it takes much too long. Is there any better way in reading out hyperlinks? Thanks for your help!
tell application "OmniFocus" set lstProjects to flattened projects of default document where note is not "" set lstTasks to flattened tasks of default document where note is not "" set the end of lstNoteItems to lstProjects set the end of lstNoteItems to lstTasks repeat with myList in lstNoteItems repeat with theItem in myList tell note of theItem repeat with myPara in paragraphs set myLink to value of attribute "link" of style of myPara if myLink contains "x-devonthink-item://" then set the end of myDTuuids to my getIDfromLink(myLink as string) end if end repeat end tell end repeat end repeat end tell