As part of a previously working Keyboard Maestro macro, i use the following AppleScript (developed by someone else), which seems not to work in DT4 beta:
set masterList to {}
tell application id "DNtp"
set allDatabases to every database
repeat with thisDatabase in allDatabases
set dbName to name of thisDatabase
set allGroups to (every record of thisDatabase whose type is group)
set groupList to {}
repeat with thisGroup in allGroups
set groupName to name of thisGroup
set groupUuid to uuid of thisGroup as string
if groupName is not in {"Trash", "Tags"} then
set tempList to groupName & ":" & groupUuid
if groupList = {} then
set groupList to tempList
else
set groupList to groupList & "
" & tempList
end if
end if
end repeat
if groupList ≠{} then
if masterList = {} then
set masterList to groupList
else
set masterList to masterList & "
" & groupList
end if
end if
end repeat
--set masterList to "[" & masterList & "]"
end tell
set saveTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"
"}
set masterList to masterList as string
set AppleScript's text item delimiters to saveTID
return masterList
ScriptEditor points to the parenthetical portion (every record…) in the sixth line as the culprit:
set allGroups to (every record of thisDatabase whose type is group)
I’ve checked the AppleScript dictionary for DT4, but can’t figure out what, if anything, might have changed in the syntax. The error message is:
error “DEVONthink got an error: Can’t get property list item.” number -1728 from
Thanks for any help.