Calendar refuses to create an event

I’m sorry to use the forum just for that but it looks like ASUL has again unsubscribed me and that group.io has yet to process my posts…

I have a properly working script before Catalina that created an event based on arbitrary data I fed it. Now it won’t work.

Here is the gist:

tell application "Calendar"
    set myJob to make new event in calendar "翻訳" with properties {allday event:true, status:confirmed, start date:(date "Tuesday, October 22, 2019 0:00:00"), end date:(date "Wednesday, October 23, 2019 0:00:00"), description:"test", summary:"test", location:"test", url:"test"}
    show myJob
end tell

and the error is “AppleEvent Handler failed”

which is quite inconvenient. Is there a way around that ?

I’m also thinking of just creating an ICS file that I’ll open in Calendar, which will be better for archiving purposes to.

Considering the number of views and the lack of reply, I guess that’s a local issue that nobody can reproduce ? I wouldn’t be surprised.

I guess the ICS file creation workaround will do. But the weird thing (unrelated to AS though) is that there is no way to set a calendar in an ICS file. (the "in calendar “翻訳” part in the code above), so I have to manually select the calendar and validate the choice at each new event creation. It’s minor hassle but I so wish the above code worked nicely…

I’m guessing very few people here are running Catalina.

1 Like

Because it sucks when AS is concerned (especially) ?

I don’t know that the lack of love is AppleScript specific.

When I remove the property status:confirmed, your code works.

tell application “Calendar”
set newCal to make new event in calendar 1 with properties {allday event:true, start date:(date “Tuesday, October 22, 2019 at 12:00:00 AM”), end date:(date “Wednesday, October 23, 2019 at 12:00:00 AM”), description:“test”, summary:“test”, location:“test”, url:“test”}
end tell

1 Like

You just saved me countless debugging hours. Thank you.