Reveal records

Hi,
is there a way to reveal a list of records in the viewer window?

Depending on the used view, it might be possible by setting the selection:


tell application "DEVONthink Pro"
	set selection of viewer window 1 to theRecords
end tell

Thank you very much for this quick reply. I tried your suggestion in all views but without success. The following (pointless) script even unselects the selected records. Any ideas why?

tell application “DEVONthink Pro”
set theRecords to selection
set selection of viewer window 1 to theRecords
end tell

It works as long as the enclosing group (“root”) of the window is a parent of the records to reveal. Therefore this should always work but might change the view:


tell application "DEVONthink Pro"
	set theRecords to selection
	set root of viewer window 1 to (parent 1 of item 1 of theRecords)
	set selection of viewer window 1 to theRecords
end tell

perfect!