Hi all (hi hi Jim!)
I am a bit confounded here ![]()
I have an rtf file with a list of records, like so:
1978 Mentally disabled people 1v_Green_IMG_4011_exported_20220701
1978 Industry and Technic_Green_IMG_0501_exported_20211218
1978 Landscapes_Green_IMG_9351_exported
1978 Men's world Handball Championships_Green_IMG_3034_exported_20220125
1978 Sports Editions_Green_IMG_9578_exported_20210621
1978 The 75th Anniversary of the Deutsche Museum in Munich_Green_IMG_9710_exported_20210707
1978 Young Philatelists_Green_IMG_0010_exported_20211208
1978 Linnes resort 6v_Green_IMG_1977_exported_20220106
1978 Perrault Fables_Green_IMG_4547_exported_20220706
1978 R.A. Schroder 1v_Green_IMG_3847_exported_20220620
And I wanted to be able to find the corresponding records in database “FOO”
I did create an AS starter that reads (doesn’t iterate yet) the paragraphs of the rtf and stores them in a variable. Then I tell DT to return the contents of database “FOO” which match that variable.
Here’s is the (work in progress totally) script:
tell application “DEVONthink”
set searchPhrase to paragraph 1 of rich text of item 1 of (get selection)
return contents of current database whose filename is searchPhrase
end tell
this doesn’t return anything.
However, if I manually copy the first line of the rtf file and set searchPhrase to it, it does return the correct matching record. Also, I know that the line “set searchPhrase” also works correctly, and captures that rtf first line.
I pasted these values in BBEdit with invisibles toggled on, to see if there were any different hidden characters, but no, they are exactly the same.
At this point, I am lost… Any ideas?


