ical alarms + growl

The Growl forums have moved to Google Groups, this forum is read only.
User avatar
goinup
Latté
Posts: 51
Joined: Sat Dec 04, 2004 8:48 pm

ical alarms + growl

Postby goinup » Wed Jan 05, 2005 10:53 pm

I did a search and didn't see this discussed before..

I was wondering if there was anyway to have ical alarms use growl?

thanks

Eridius
Growl Team
Posts: 5
Joined: Mon Dec 06, 2004 5:59 pm
Location: Concord, MA
Contact:

Postby Eridius » Thu Jan 06, 2005 3:55 am

That would require hacking iCal, and would be extremely difficult, if not impossible, to implement.
Remember, no matter where you go, there you are
--Buckaroo Banzai

danmeltzer
Harmless
Posts: 5
Joined: Fri Dec 10, 2004 11:18 pm
Location: DE
Contact:

Postby danmeltzer » Sat Jan 08, 2005 6:23 am

I'm certainly not someone who usually has any clue as to anything technical around here... but wouldn't it be easy to have iCal run an applescript as the alarm? Then you could (I say "you" purposefully, because "I" could not, as I have no technical ability as previously noted. It's a general "you" not meaning anyone in particular) just write an applescript to cause a growl alert with whatever the name of the alarm event is? you just have to remember to set the alarm to open that file when you set a new alarm...

Not the best solution, but a relatively simple one that I believe would be entirely possible...

User avatar
smajor
Latté
Posts: 84
Joined: Fri Dec 03, 2004 11:56 pm
Location: 127.0.0.1
Contact:

Postby smajor » Sun Jan 09, 2005 1:49 pm

danmeltzer wrote:I'm certainly not someone who usually has any clue as to anything technical around here... but wouldn't it be easy to have iCal run an applescript as the alarm? Then you could (I say "you" purposefully, because "I" could not, as I have no technical ability as previously noted. It's a general "you" not meaning anyone in particular) just write an applescript to cause a growl alert with whatever the name of the alarm event is? you just have to remember to set the alarm to open that file when you set a new alarm...

Not the best solution, but a relatively simple one that I believe would be entirely possible...


I dabble in AppleScript when I need too (more like fumble around) and the iCal dictionary DOES seem to have commands where you could poll for the event name and other details. You could do an alarm that then calls an AppleScript, I suppose.

User avatar
Diggory
Growl Team
Posts: 129
Joined: Sat Dec 04, 2004 12:17 pm
Location: London

Postby Diggory » Mon Jan 24, 2005 7:28 pm

You can get growl to display a generically titled alarm - but getting the info from the alarm into the growl notification is pretty much impossible through AppleScript.

The trouble is that iCal just runs the script - and does not pass any reference to the specific event that caused it.

The script can talk to iCal - but cannot figure out which event called for the script to be executed. You can't even narrow it down by looking at all the events' start times - because that has nothing to do with the alarm time.

stu
Harmless
Posts: 2
Joined: Wed Mar 02, 2005 8:53 pm
Location: UK

Postby stu » Thu Mar 03, 2005 1:37 am

What you want to do is possible with a little fiddling but you will lose the ability to send event notifications by email. If you look at this tip on MacOSXHints:

http://www.macosxhints.com/article.php? ... 1062557960

There's a comment at the bottom "Authored by: dbikel on Tue, Oct 14 '03 at 12:44PM" which explains the procedure (it's pretty simple but make sure you take a backup copy of iCal first!).

Although their aims are different (using Sendmail for mail notifications), the process works exactly the same. The applescript I pasted in place of "on send_mail_sbr" was:

Code: Select all

on send_mail_sbr(subjectLine, messageText, myrecipient)
   tell application "GrowlHelperApp"
      set theName to "New Event"
      set theAppName to "Custom iCal Notifications"
      set the allNotificationsList to {theName}
      set the enabledNotificationsList to {theName}
      
      register as application theAppName ¬
         all notifications allNotificationsList ¬
         default notifications enabledNotificationsList ¬
         icon of application "iCal"
      
      notify with name theName ¬
         title subjectLine ¬
         description messageText ¬
         application name theAppName ¬
         with sticky
   end tell
end send_mail_sbr


Once you've finished following the instructions, just select "Email" as the event alarm type and you should be set. This is a bit of a hack but it works with Growl 0.6 and iCal 1.5.5 here. As always with such things, YMMV - Enjoy!

User avatar
djmori
Mocha
Posts: 522
Joined: Sun Dec 05, 2004 2:08 am
Location: Bogota, Colombia
Contact:

Postby djmori » Sat Mar 05, 2005 4:59 pm

Thats a great idea :D

stu
Harmless
Posts: 2
Joined: Wed Mar 02, 2005 8:53 pm
Location: UK

Addition to my last hint

Postby stu » Sat Mar 05, 2005 7:58 pm

If you liked that, you'll love this ... in addition to my last hint, you can now hide the email address field and replace the "Email" alarm type with "Growl" or whatever you prefer. In the iCal.app package content, alter the following files as specified:

    Contents/Resources/[English].lproj/Localizable.strings
    Search for '"Email"' and replace the value with "Growl" or whatever you want to appear in the alarm menu.
    eg:

    Code: Select all

    "Email" = "Growl";
    Contents/Resources/[English].lproj/CALLocLayout.plist
    Comment out "<string>EmailPopup</string>" to get rid of the email address pulldown.
    eg:

    Code: Select all

    <!--string>EmailPopup</string-->
    Contents/Resources/[English].lproj/NewInspector.strings
    Search for '"Send an email at %@, %d %@ %@"' and replace the value with something like '"Growl me %2\$d %3\$@ %4\$@ %1\$1.1s"'.
    eg:

    Code: Select all

    "Send an email at %@, %d %@ %@" = "Growl me %2\$d %3\$@ %4\$@   %1\$1.1s";

    This tricks the String handler into replacing the email address with a single unicode character.

Note: Replace [English] with your language.
Disclaimer: As before.[/code]

Mr Toner
Harmless
Posts: 1
Joined: Sun Apr 02, 2006 4:29 am

Postby Mr Toner » Sun Apr 02, 2006 5:54 am

This is freakin' awesome! I hate the notifications iCal uses and this works great with iCal 2.0.3 and Growl 0.7.4.

Some notes about dbikel's instructions:

- Recent versions of Script Editor differ: Save As... and select "Script" from the popup and check the Run-Only chceckbox

- It shouldn't be necessary to use any developer tools -- just rename the original files and drag the new ones in place

- Likewise, I didn't find it necessary to change permissions, but if you do use quotes ("") around "iCal Helper.app" when changing the owner and permissions in Terminal

- Logout or use Activity Monitor to quit iCalAlarmScheduler

I'm going to hate doing this every time iCal is updated, but using Growl for iCal reminders will be sooo worth it!


Return to “Growl”

Who is online

Users browsing this forum: No registered users