• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: adding an email alarm to an ical event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding an email alarm to an ical event


  • Subject: Re: adding an email alarm to an ical event
  • From: Nigel Garvey <email@hidden>
  • Date: Thu, 02 Jun 2011 22:47:02 +0100

Bob Cuilla wrote on Wed, 01 Jun 2011 21:10:58 -0400:

>I would like use AS to add an email alarm to a group of iCal events.   I
>cannot seem to find the correct syntax in the dictionary.  Can anyone point
>me in the right direction.  I would like to have a one year recurring
>interval since these all these events are birthdays and anniv.  Thanks in
>advance for you help.

  tell application "iCal"
    tell myCalendar
      tell myEvent
        -- Give the event an e-mail alarm which triggers a week beforehand.
        make new mail alarm at end of mail alarms with properties
{trigger interval:-(weeks div minutes)}
        -- Set the event to recur on the anniversaries of its start date.
        set recurrence to "FREQ=YEARLY;INTERVAL=1"
      end tell
    end tell
  end tell

The trigger interval of the alarm is set in minutes and is negative to
make the alarm trigger before the event.

If you have any friends with birthdays on 29th February, a straight
annual recurrence will miss out their non-leap birthdays. You can have
the event recur instead on the last day of February, whether that be the
28th or the 29th, like this:

   set recurrence to "FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYMONTHDAY=-1"

Or if they celebrate on 1st March instead, you can have the event recur
on the 60th day of the year:

   set recurrence to "FREQ=YEARLY;INTERVAL=1;BYYEARDAY=60"

NG

 _______________________________________________
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

  • Prev by Date: Talking to apps running under different users' accounts on same machine?
  • Next by Date: Re: afplay
  • Previous by thread: adding an email alarm to an ical event
  • Next by thread: afplay
  • Index(es):
    • Date
    • Thread