Add a Calendar Entry

Maybe as an update for anyone else interested: I have been working on it and after many errors, I have created the following apple script that works for me:

set eventtitle to system attribute "KMVAR_local__docnumber"
set eventURL to system attribute "KMVAR_local__calurl"
set eventDescription to system attribute "KMVAR_local__calnote"
set x to system attribute "KMVAR_Local__AdjustBy"
set theStartDate to (current date) + (x * days)
set hours of theStartDate to 18
set minutes of theStartDate to 0
set seconds of theStartDate to 0
set theEndDate to theStartDate + (60 * minutes)

tell application "Calendar"
	tell calendar "Test"
		set newEvent to make new event with properties {summary:"DUE " & eventtitle, start date:theStartDate, end date:theEndDate, description:eventDescription, url:eventURL}
	end tell
end tell

That works for me and creates an entry on that day. Somehow the reminder does not work on Apple Script. If any one has a solution for that, I would be more than happy to hear about it.

1 Like