I could have sworn that i used to be able to select a default database in database properties. That seems to be gone now.
I want to change a script from set theDatabase to the current database
to
set theDatabase to the default database
If that isn’t an option, can I just do “set theDatabase to database name” and do I need quotes around the name if there are multiple words?
tell application id "DNtp"
try
set theDatabase to database "_temp"
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell
You always have to use quotes for every literal string. Without quotes you’re creating an undefined variable.
Sorry a bit confused with what that script is doing?
Database is called Devonthink 2020
I don’t want to change it to Devonthink2020 or it will mess up rules and scripts.
I tried "set theDatabase to database “Devonthink 2020” and the script didn’t run.
You don’t need to change the name. It’s the correct way to set a database in AppleScript, no idea why it doesn’t work for you. Ah - the database has to be open.