Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Set alarms for subscribed iCal calendars Apps
I was frustrated to find out that in iCal, I could not attach alarms to events from other people's calendars that I had subscribed to. However, I later discovered that this is actually possible. Even though you cannot change the alarm settings on events that you have imported from other people using iCal's user interface, you can change them through AppleScript! A script such as the following should work:
tell application "iCal" to make new sound alarm at end of ¬
(sound alarms of (event event_index of calendar cal_index)) ¬
with properties {trigger interval:-30, sound name: "Hero"}
event_index and cal_index are variables. You have to set them to the index of the calendar and event that you wish to access. So, for example, if you have calendars named "Work," "Personal," and "My Imported Calendar," set cal_index to 1 to get to Work, 3 for My Imported Calendar, etc. I believe the index numbers match with the order the calendars appear in the calendar selection column in iCal.

event_index is trickier, since events are organized internally in iCal using a method that is not easy for the user to see (I think it just assigns them an ID based on the order they were created). So this is sort of an "experienced scripter" hint; you'll have to build a short script to list the events in the calendar, find the event you want in the list, and set event_index to the cardinal position of the element. i.e., for events {foo, bar, Breakfast at Tiffany's}, bar has an event_index of 2).

Note that as of right now, iCal only allows you to access calendar events (and calendars themselves) by index, so this method is pretty clunky. But it does seem to work, although I haven't tested the effects of the calendar's publisher changing the calendar. Yet another example of a software feature "accidentally" added by the AppleScript interface!
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,423 views]  

Set alarms for subscribed iCal calendars | 2 comments | Create New Account
Click here to return to the 'Set alarms for subscribed iCal calendars' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set alarms for subscribed iCal calendars
Authored by: wackazong on May 24, '04 03:03:37PM

what happens if you update the calendar afterwards? do the reminders get removed?



[ Reply to This | # ]
Use whose clauses and you're all set
Authored by: jporten on May 25, '04 07:14:48PM

No need to muck with ID numbers -- this returned an addressable list of events in my subscribed calendar.

set thisCal to item 1 of (calendars whose title is "Jewish Calendar")
set thisCalEvents to events of thisCal whose summary contains "Rosh Hashana"



[ Reply to This | # ]