The same happens with selected records in the place of selection, btw, with JXA as well. On the other side, retrieving the class of the record returns record, as it should.
I’m wondering if that might be related to the fact that the type of property is also record, albeit a different one, namely the AppleScript datatype.
I possibly have another issue introduced around 3.8.4 that is also present in 3.8.5 running macOS Monterey 12.5.
Once of my rules in Hazel executes a shell script through which DEVONthink is automated using osascript. In below a snippet from the script:
Command='
tell application id "DNtp"\n
launch\n
set theDatabase to open database "'$DevonthinkFolder'/'$DatabaseName'.dtBase2"\n
set theGroup to create location "'$FolderName'/" in theDatabase\n
set theRecord to import "'$FullPath'" to theGroup\n
set the name of theRecord to "'$NewName'"\n
end tell\n
'
This has worked flawlessly for years and imports a file to a given database and location. Which database and location are to be used, is determined elsewhere in the script.
The issue that currently manifests itself is that when the script is executed, DEVONthink first gives a message indicating that the database is already in use and I can continue or abort.
Afterwards, it imports the file, but often not in the correct database that was determined by the script.
I’m confident that the databases in question are not in use elsewhere and that they were previously correctly closed.
Reverting back to 3.8.3 causes the script to run stable again.
Do you have any idea what can cause this and are there things I can do to help figure it out?
Was DEVONthink properly terminated the last time? The most likely reasons for such a message are a crash, force quit, kernel panics or multiple instances of DEVONthink installed (so that the script launches another one which can’t open the database anymore).
BTW:
The current version is 3.8.5 which fixes the original issue of this thread.