invoke "see also" from external application?

Hi,

(how) is it possible to invoke “see also” for the selected text outside DevonThink Pro?

e. g.
I’m writing my LaTeX document in a text editor (TeXShop) and would like to search in a certain database for matching information to the paragraph I’m currently editing.

(I could copy the text in a “dummy” rtf document in DT Pro, but that would be quite time consuming)

Is there a way to do that e. g. by Apple Script?
(I did not find anything in the services or scripts menu, or did I overlook it?)

Martin

I asked the same question about a year ago, and would be quite pleased if some clever person developed a technique for doing this, or – even better – if it could be worked into DT as a service, or something.

In other words: bump.

ouch :frowning:
Thanks for raising my hopes - I had not found your question http://www.devon-technologies.com/scripts/userforum/viewtopic.php?f=2&t=7157&p=33507#p33507 in my forum search.

So how did you work around since then?

Martin

You could use the "compare content to " AppleScript command but this script doesn’t open the drawer, it’s for scripting and therefore just returns the most similar records.

Hi Christian,

I’m searching for a way to create a DevonThink search window automatically (via Apple Script) and searching for documents with a certain name e.g.

Unfortunately I have nearly no programming experience with AS and I can only modify existing scripts, but I did not find anything.

I tried

tell application "DEVONthink Pro"
compare content "German2004" to database
end tell

but I dont see how to export the list of results to the GUI.
:frowning:

Can anybody help?

This is not (yet) supported, one workaround might be UI scripting (see viewtopic.php?f=20&t=8498)

Hi Christian,

thanks for your answer.
I tried both “workaround”, but they both return a list like:


{content id 1794711 of database id 2 of application "DEVONthink Pro", content id 1963494 of database id 2 of application "DEVONthink Pro", ...

and can not open a search window in DTPro.

Is there no way to tell DTPro to “hit Cmd-Shift-F” and then at least type a certain text?
IT would be great if the options in the side bar could also be accessed…

This should be possible using UI scripting but changing the options depends heavily on the current interface/localization and therefore might break with each new release.


tell application "DEVONthink Pro" to activate
tell application "System Events"
	keystroke "F" using {command down}
	delay 0.5
	set the clipboard to "Example"
	keystroke "v" using {command down}
end tell

Did you try the “See Related Text” and “Search Selected Phrase” contextual menu commands?