Switching the view back after document merge.


I get a lot of single page documents and have to merge them into multi page documents. Here I use a script I found in this forum which I modified to automatically name the documents.

My problem is, that after merging, the view switches form the list with the document to the newly merged document.

How can I switch the view back to the original list which was displayed before merging the documents?

I tried various things like this:

tell application id "DNtp"
    ... merge script ...
    set content record to incoming group of current database
end tell

If selecting the previous view is not possible, it would also help just to select the Inbox of the current database.

Interestingly, this kind of question came up recently - and though making selections is often a misunderstanding of what automation is for, you can change the selection of the window. It requires a list though. Here is a line that selects the inbox of the current database, noting the braces automatically coerce the item into a one-item list…

set selection of window 1 to {incoming group of current database}

Perfect! Thank you very much for the help!

No problem.