I would like creating an event to be a very simple process.
I have written this script and when I run it I get the error "iCal got an error: AppleEvent handler failed." The script seems sound, what am I doing wrong?
I have written this script and when I run it I get the error "iCal got an error: AppleEvent handler failed." The script seems sound, what am I doing wrong?
Code:
tell application "iCal"
tell calendar "Home"
display dialog "What is the name of the event?" default answer "Enter name here"
set eventName to text returned of result
display dialog "Describe this event" default answer "Enter description here"
set eventDescription to text returned of result
display dialog "Where is this event?" default answer "Enter location here"
set eventLocation to text returned of result
display dialog "What is the start date and time?" default answer "MM/DD/YY"
set startDate to text returned of result
display dialog "What is the end date and time?" default answer "MM/DD/YY"
set endDate to text returned of result
make new event at end with properties {description:eventDescription, summary:eventName, location:eventLocation, start date:startDate, end date:endDate, allday event:true}
end tell
end tell