ical alarms + growl

The Growl forums have moved to Google Groups, this forum is read only.

ical alarms + growl

Postby goinup » Wed Jan 05, 2005 5: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
User avatar
goinup
Latté
 
Posts: 51
Joined: Sat Dec 04, 2004 3:48 pm

Postby Eridius » Wed Jan 05, 2005 10:55 pm

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
Eridius
Growl Team
 
Posts: 5
Joined: Mon Dec 06, 2004 12:59 pm
Location: Concord, MA

Postby danmeltzer » Sat Jan 08, 2005 1: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...
danmeltzer
Harmless
 
Posts: 5
Joined: Fri Dec 10, 2004 6:18 pm
Location: DE

Postby smajor » Sun Jan 09, 2005 8:49 am

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
smajor
Latté
 
Posts: 82
Joined: Fri Dec 03, 2004 6:56 pm
Location: 127.0.0.1

Postby Diggory » Mon Jan 24, 2005 2: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.
User avatar
Diggory
Growl Team
 
Posts: 128
Joined: Sat Dec 04, 2004 7:17 am
Location: London

Postby stu » Wed Mar 02, 2005 8:37 pm

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!
stu
Harmless
 
Posts: 2
Joined: Wed Mar 02, 2005 3:53 pm
Location: UK

Postby djmori » Sat Mar 05, 2005 11:59 am

Thats a great idea :D
User avatar
djmori
Mocha
 
Posts: 521
Joined: Sat Dec 04, 2004 9:08 pm
Location: Bogota, Colombia

Addition to my last hint

Postby stu » Sat Mar 05, 2005 2: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]
stu
Harmless
 
Posts: 2
Joined: Wed Mar 02, 2005 3:53 pm
Location: UK

Postby Mr Toner » Sun Apr 02, 2006 12: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!
Mr Toner
Harmless
 
Posts: 1
Joined: Sat Apr 01, 2006 11:29 pm


Return to Growl

Who is online

Users browsing this forum: No registered users