Interestingly, that does work. With another record and similar properties, nothing appeared in the Inspector.
It works differently. See
- javascript automation - How to make new document with JXA? - Stack Overflow
- and Working with Apps | JavaScript for Automation (JXA)
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});
console.log(theReminder);
record.reminder = theReminder;
})()
This, for example, crashes in the assignment. But it works up to the console.log
call.
OTOH,
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.