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

Create 'pre-alarmed' events in iCal Apps
If, like me, you use iCal to track your schedule and to-do's, you're probably annoyed by a few 'features' of the program. In my case, one of my biggest gripes is that when you create a new event, iCal won't automatically enable an alarm for the event. The vast majority of the time, when I add an event to the calendar, I'd like to be reminded of that event -- after all, that's part of the reason I'm using an electronic calendar in the first place! But new events in iCal do not automatically get an alarm, and there's no preference setting to change this seemingly useless behavior.

Enter Robert Blum's iCalFix, which I found yesterday while surfing for some completely unrelated topic. iCalFix will automatically put a 24-hours-before alarm on any new iCal events you add to the calendar. That's all it does, as of right now -- in version 0.2, Robert promises you'll be able to change the default 'time before' for the alarm setting.

I've been using this for a couple of days now, and it hasn't caused any issues as of yet. However, as with anything that modifies an application, it's a good idea to make sure you've got a current backup -- in this case, of your iCal data files -- just in case something does go wrong.

Note that you'll need Mike Solomon's SIMBL Input Manager (Mike's also the author of PithHelmet for Safari). Some people may have an issue with using SIMBL, as it allows modification of a program's code. I've been using SIMBL for quite a while now (it's necessary for many other cool hacks, such as AcidSearch), and have yet to have any issues I could trace back to it, so I feel relatively comfortable having it installed.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[11,723 views]  

Create 'pre-alarmed' events in iCal | 11 comments | Create New Account
Click here to return to the 'Create 'pre-alarmed' events in iCal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create 'pre-alarmed' events in iCal
Authored by: rspress on Dec 30, '05 09:45:27AM

I keep pestering Apple, via their feedback page, to add a pane or well for events. Say you have an event that reoccurs from time to time but not on a regular basis. You could drag this event from the pane or well with the time and alarms you set up for it before you saved it or dragged it to the well.

Adding this feature would make handling events much easier but so far it has gone unanswered. For now I just copy and paste similar events but this is a pain when I have to search for a similar event!



[ Reply to This | # ]
Create 'pre-alarmed' events in iCal
Authored by: magir on Mar 07, '06 02:56:21PM

I suggest to use bugreport.apple.com to submit Feature Requests.

Just in case you didn't know: When you drag and drop an event while the option-Key is pressed, the event is duplicated, which might be faster as copy and paste in same cases.

Besides that I agree that templates and more configuration options have to be added. It's a pity that iCal hasn't been updated in recent versions of OSX.



[ Reply to This | # ]
Create 'pre-alarmed' events in iCal
Authored by: mark hunte on Dec 30, '05 09:54:02AM
Thanks for the Hint, I'm mostly do not like to add 3party apps to enhance my apple apps. You can do this in Applescript for those of you do not want 3party apps.

This is a cut down of an old script, the original asked for the date you wanted to put the event on and Description and notes et. for the event. I have cut it down here just to show the set alarm part for the new event.

Save it to you applescript menu or use it with one of the hotkey apps. It will make a new event with the alarm set for minutes or hours, you choose. Also you choose which cal.

I do not in any way suggest this is a better way of doing it, and look forward to see what else comes out of Robert Blum's iCalFix. Maybe apple will look at iCalFix and pull their finger out, because there really should be an option set in the prefs for this.

set iCalendars to {}

set theCals to {}

tell application "iCal"
  set theCals to calendars whose writable is true
  repeat with i from 1 to count of theCals
    copy title of item i of theCals to end of iCalendars
  end repeat
end tell

set theyear to (year of (current date)) as string

display dialog "Enter Minutes or Hours before event to sound alarm(blank for no alarm): " default answer "1" buttons {"Minutes", "Hours", "Cancel"} default button 1
copy the result as list to {theAlarmTime, button_pressed}

set theChoice to choose from list iCalendars with prompt "Choose the Calendar to use" OK button name "Choose" without multiple selections allowed and empty selection allowed

if theChoice is not false then
  set theCalChoice to item 1 of theChoice
end if
set theCalName to theCalChoice
-- Run through our Calendar list and find the iCal id of the chosen Calendar
set i to 1
repeat with anitem in iCalendars
  if item i of iCalendars is equal to theCalName then
    set theNum to i
    exit repeat
  end if
  set i to i + 1
end repeat
set currentCal to item theNum of theCals
tell application "iCal"
  activate
  set theEvent to make event at end of events of currentCal -- with properties {start date:theDate, end date:endDate, summary:theSummary, description:"entry by : " & theSStaffname & " on " & timestamp})
  if theAlarmTime is not "" then
    if button_pressed is equal to "Hours" then
      set theAlarm to (theAlarmTime as integer) * -60
    end if
    if button_pressed is equal to "Minutes" then
      set theAlarm to (theAlarmTime as integer) * -60 / 60
    end if
    make new sound alarm at end of sound alarms of theEvent with properties {trigger interval:theAlarm}
    
  end if
  tell application "iCal"
    show theEvent
  end tell
end tell 

mh

[ Reply to This | # ]
Create 'pre-alarmed' events in iCal
Authored by: mac4hire on Dec 30, '05 11:38:39AM

ok...so maybe I don't wholly understand what you want different than what is already built into iCal.

Are you aware that you can add as many Alarms to an Event as you want?
where it says "alarm" Click on it (hold the mouse button down) and go to "Add Alarm" and then next to where the new alarm shows click on the "None" and add your alarm for the event.

Make it an emailed alarm, sound, play an iTunes song ... whatever....

so - did I miss your point somehow?

---
If a window forces you to think \"what now?\"
It\'s been incorrectly designed.



[ Reply to This | # ]
Create 'pre-alarmed' events in iCal
Authored by: patlaj on Dec 30, '05 01:44:03PM

The problem with the current behaviour is that you have to manually add alarms. I get new meeting requests all the time. Every time I add an event, I have to go into the info box and choose to be alerted with a message 10 minutes before. Anytime you find yourself doing the same thing again and again it's pretty clear that it should be automated.

It's amazing that iCal has been around as long as it has and it still doesn't have a preference for this. I mean, they've chosen a default setting - no alarm. It would likely be trivial to have a control to allow users to set their own default.



[ Reply to This | # ]
Create 'pre-alarmed' events in iCal
Authored by: rspress on Jan 01, '06 06:25:22AM

Yes, you did miss the point.

The point is that unless you copy and paste an event that already has alarms set up for it the way you like there is no way to set up an event with alarms already attached. If you choose new event you have to start from scratch every time. This is a pain in the butt if you have say an event the happens on a semi-regular basis that has, say, three alarms set. If your event occur every week you can set them up to reoccur easliy but if they occur at very odd dates and times you can't set them to reoccur. Why Apple has not added an event well in which you can drag your premade events with times and alarms already set to the date of your choice is beyond me. As it is now iCal is very un-Maclike!



[ Reply to This | # ]
Create 'pre-alarmed' events in iCal
Authored by: mark hunte on Jan 01, '06 06:32:29AM
As a request from matthewroth in a email, for me to submit a bit more of the applescscript I posted. I still had to take a small part out. But here it is.

set iCalendars to {}

set theCals to {}

tell application "iCal"
  set theCals to calendars whose writable is true
  repeat with i from 1 to count of theCals
    copy title of item i of theCals to end of iCalendars
  end repeat
end tell

tell application "Finder"
  
  display dialog "Enter Event Title " default answer "New Event"
  
  set theSummary to the text returned of the result
  display dialog "Enter Any Notes/Leave blank for None: " default answer ""
  
  set theDiscript to the text returned of the result
  
  set timestamp to current date
  set theday to (day of (current date)) as string
  
  
  set monthList to {January, February, March, April, May, June, July, August, September, October, November, December}
  repeat with i from 1 to 12
    if timestamp's month = item i of monthList then
      set theMonth to text -2 thru -1 of ("0" & i)
      exit repeat -- no point continuing once we have what we want
    end if
  end repeat
  
  set theyear to (year of (current date)) as string
  
  display dialog "Enter Date of the event: i.e  dd/mm/" & theyear default answer theday & "/" & theMonth & "/" & theyear
  
  set theSdate to the text returned of the result
  
  display dialog "Enter time of the event : (24 hour time)" default answer "12:00"
  
  set theTime to the text returned of the result
  
  display dialog "Enter ending time of event (24 hour time)" default answer "13:00"
  
  set theEtime to the text returned of the result
  
  display dialog "Number of Minutes or Hours before event to sound alarm(blank for no alarm): " default answer "1" buttons {"Minutes", "Hours", "Cancel"} default button 1
  copy the result as list to {theAlarmTime, button_pressed}
  
  
  set theChoice to choose from list iCalendars with prompt "Choose the Calendar to use" OK button name "Choose" without multiple selections allowed and empty selection allowed
  
  if theChoice is not false then
    set theCalChoice to item 1 of theChoice
  end if
  
  set theCalName to theCalChoice
  
  -- Run through our Calendar list and find the iCal id of the chosen Calendar
  
  set i to 1
  
  repeat with anitem in iCalendars
    if item i of iCalendars is equal to theCalName then
      set theNum to i
      exit repeat
    end if
    set i to i + 1
  end repeat
end tell

set currentCal to item theNum of theCals

set theDate to date theSdate

set theDate to date theTime of theDate

set endDate to date theSdate

set endDate to date theEtime of endDate


tell application "iCal"
  activate
  set theEvent to (make event at end of events of currentCal with properties {start date:theDate, end date:endDate, summary:theSummary, description:theDiscript & return & " : time-stamp :  " & timestamp})
  if theAlarmTime is not "" then
    if button_pressed is equal to "Hours" then
      set theAlarm to (theAlarmTime as integer) * -60
    end if
    if button_pressed is equal to "Minutes" then
      set theAlarm to (theAlarmTime as integer) * -60 / 60
    end if
    make new sound alarm at end of sound alarms of theEvent with properties {trigger interval:theAlarm}
    
    
  end if
  tell application "iCal"
    show theEvent
  end tell
end tell 

---
mh

[ Reply to This | # ]
Date conversion problems
Authored by: SeanAhern on Jan 02, '06 10:52:37AM

This script works for me, for the most part. The only problem is the parsing of dates. This might be affected by the "International" setting of the OS. When the date "3/1/2006" is parsed, I get March 1st, rather than the January 3rd I expected. I fixed up my copy of the script so that it prompts me the way I expect, but I think this is likely not a bug in the script. I'm guessing that the conversion of the string to a date is probably dependent on the user's settings, as I'm using U.S. formatting.



[ Reply to This | # ]
Date conversion problems
Authored by: mark hunte on Jan 02, '06 02:05:41PM
Yes I should have pointed that out I'm in the Uk so the format is the Uk style.

This should help.
Change

 display dialog "Enter Date of the event: i.e  dd/mm/" ¬
& theyear default answer theday & "/" & theMonth & "/" & theyear

to

 display dialog "Enter Date of the event: i.e  mm/dd/" ¬
& theyear default answer theMonth  & "/" & theday & "/" & theyear

---
mh

[ Reply to This | # ]

Date conversion problems
Authored by: osxpounder on Mar 07, '06 12:53:24PM
I'm trying to figure out how to modify this script, so that it gets the current time, adds a fixed number of minutes to it, and puts that in the dialog box as the default answer here:

display dialog "Enter time of the event : (24 hour time)" default answer XXXXX

... where the XXXXX would be replaced with whatever code can do the job. I'm thinking that it'd be helpful to set an iCal appointment for, say, a half-hour from now, and let the script figure out what time "now" is. Is it possible? I've searched the Dictionary, in Script Editor, for Finder, iCal, and System Events, but the search keyword "time turns up nothing that seems useful. I know almost nothing about AppleScript, so this might be obvious to some of you. I took a stab at it, but apparently "current time" doesn't work.

---
--
osxpounder

[ Reply to This | # ]

.03 icalfix released
Authored by: bcometa on Apr 09, '06 10:32:36PM

and works perfectly as far as i can tell... you can also set default alarm time and sound.



[ Reply to This | # ]