AppleScript-created reminder not visible

I’m starting to work with reminders, and am encountering what may be an inconsistency with Applescript.
I can create a reminder for an item, with a due date, in the inspector, and read off its properties in a script, or remove it that way.
But if I create a reminder for the item in Applescript, I don’t see anything in the inspector. But the reminder does exist, AppleScipt tells me. And if in some view I show the Due Date column, the correct date is there. But I have no way to see the other properties in the inspector, which sometimes would be convenient. Am I missing something?

Show your code, please

For instance:

tell theRec to make new reminder with properties {due date:theDate, schedule:monthly, interval:2}

This reminder will be attached to the record correctly.

Back to AppleScript again, and this :

get properties of reminder of theRec


{class:reminder, week of month:no week, alarm:no alarm, interval:2, masc:0, day of week:no day, schedule:monthly, due date:date "woensdag 24 januari 2024 om 1:56:00 PM", alarm string:missing value}

But it is not visible in the inspector.

I can confirm that, but I don’t know what’s at the root of it.
DT 3.9.4, macOS 14.2.1
@cgrunenberg might have an idea. Also: The scripting dictionary says:

Reminder Object [inh. Item] : A reminder of a record. Use the command 'make new ... with properties {...} at ... ' to create new reminders.

which is not how the make command is used here (nor in the samples I found in the forum). Instead, make is called as a command on the record itself (i.e. with tell record to make…), no at parameter used.
And I have no idea how to use all this with JavaScript. rec.make({new: "reminder"}, withProperties: {…}) throws an error as does rec.make({new: "Reminder"}, withProperties: {…})

Actually this works fine for me:

tell application id "DNtp"
	set theRec to selected record 1
	set theDate to current date
	tell theRec to make new reminder with properties {due date:theDate, schedule:monthly, interval:2}
end tell

See folder ~/Library/Application Scripts/com.devon-technologies.think3/Smart Rules for some additional examples.

The make command does not work in JXA in any application. And this crashes the Script :wink:

var app = Application("DEVONthink 3");
app.includeStandardAdditions = true;
var record = app.selectedRecords()[0];
var theDate = Date();
var theReminder = app.Reminder({'dueDate':theDate, 'schedule':'monthly', 'interval':2});
record.reminder = theReminder;

It does for me, too, and now my code works, too, without changes!
Mysterious. But thanks for the help.

Interestingly, that does work. With another record and similar properties, nothing appeared in the Inspector.

It works differently. See

At least with other apps.

(() => {
  const app = Application("DEVONthink 3");
  const record = app.selectedRecords()[0];
  var theReminder = app.Reminder({'dueDate': Date(), 'schedule':'monthly', 'interval':2});
  record.reminder = theReminder;

This, for example, crashes in the assignment. But it works up to the console.log call.


const theReminder = app.Reminder().make()

throws the error message “Object can’t be moved into the container or created in it” (my translation).
I agree that the whole make business in JXA is weird. But there are apps that make it work (kind of).
In any case: The part of the scripting lib doc that says one should use at as a parameter is probably not correct and should be fixed, I think.

Edit I just noticed that we’ve been over that before:

Sorry for not remembering that one. But as I said: Other apps work ok with similar commands. It would be nice if DT would, too.