How to create a Calendar event on a specific day of next month?
How to create a Calendar event on a specific day of next month?
- Subject: How to create a Calendar event on a specific day of next month?
- From: Jim Krenz via AppleScript-Users <email@hidden>
- Date: Sat, 19 Jun 2021 13:24:24 -0700
Hello all,
I am trying to create a Calendar event on a specific day of next month (the
18th, in this case).
I am using this workaround, as I generally create the event a month in advance:
set theStartDate to (current date) + (30 * days)
But due to months having different quantities of days (or the day that I
execute the script), the event may be created on the wrong day.
Here is the draft of the entire script:
set theStartDate to (current date) + (30 * days)
set hours of theStartDate to 14
set minutes of theStartDate to 0
set seconds of theStartDate to 0
set theEndDate to theStartDate + (3 * hours)
tell application "Calendar"
tell calendar "Home"
set newEvent to make new event at end with properties
{summary:”Rent is due", location:"Venmo", allday event:true, start
date:theStartDate, end date:theEndDate, description:"This is your courtesy
reminder to pay your rent.", url:"https://venmo.com/account/sign-in"}
tell newEvent
make new sound alarm at end of sound alarms with
properties {trigger interval:840, sound name:"Crystal"}
make new sound alarm at end of sound alarms with
properties {trigger interval:-120, sound name:"Crystal"}
make new sound alarm at end of sound alarms with
properties {trigger interval:-10200, sound name:"Crystal"}
end tell
end tell
end tell
Thanks for any help!
Sincerely,
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden