I have an applescript that adds a new record and the opens the window in edit mode from Keyboard Maestro
However I would like to run another script on this open window from KM that adds tags pulled from the existing tags in DT.
I have all this code working, but I do not know how to find the UUID of the record in this open window to add the tag. Can anyone point me in the right direction please?
tell application id "DNtp"
set theWindow to window 1
if class of theWindow as string is equal to "document window" then
set theRecord to get record of theWindow
else if class of theWindow as string is equal to "viewer window" then
set theSelection to (get selection of theWindow)
if theSelection ≠{} then
set theRecord to item 1 of theSelection
end if
end if
end tell
If you want the UUID use what @cgrunenberg said. The code I suggested indeed ignored your request for the UUID and return the record object instead. With the record object you can operate on the record immediately like such: