I have a simple script I am trying to attach to a reminder in DT3. It duplicates a record in another folder and attaches a label. The script works when I select a record and run it as an external script manually, and it works as an embedded script attached to a reminder if the record is already selected when the reminder goes off. However, if the record is not selected when the reminder goes off, nothing happens (the reminder simply dings and resets for the next reminder time). It may be that the script is running, but without the record being selected it is not running on any actual record, in which case, I don’t know how to correctly ‘select’ the record activated by the reminder within the script.
The other strange thing is that I cannot get it to work as an external script attached to the reminder even when the record is selected when the reminder goes off. I copy it exactly and put the script in the ‘Reminders’ folder. I then have to restart DT3 for the new script to show up in the dropdown menu of available external scripts (if that could be fixed in the next beta, it would be great). I set it up to run an external script when the reminder goes off, but it won’t do anything when the reminder goes off. I can’t get it to behave the way the embedded script does.
The script is below:
on performReminder(theRecord)
tell application id “DNtp”
try
if ( exists content record) then
set theContent to content record
set theDatabase to current database
set label of theContent to 5
set theGroup to get record at “/__TO DO” in the database
duplicate record theContent to theGroup
end if
end try
end tell
end performReminder
Any tips? I would also ideally like to remove the reminder in the duplicated record (but not the original), but I don’t know how to do that.