I'm trying to growl from Ruby/Appscript, based on this sample Applescript code:
tell application "GrowlHelperApp"
set the enabledNotificationsList to {"Mail Notification"}
register as application "MailWidgetGrowlHelper" all notifications enabledNotificationsList default notifications enabledNotificationsList icon of application "Mail.app"
notify with name "Mail Notification" title (item 1 of argv) description (item 2 of argv) & return & return & (item 3 of argv) application name "MailWidgetGrowlHelper" icon of application "Mail.app" without sticky
end tell
My code looks like this:
GH = app("GrowlHelperApp.app")
enabledNotifications = "AppscriptMessage"
GH.register(:as_application => "AppscriptHelper",
:all_notifications => enabledNotifications,
:default_notifications => enabledNotifications)
the last call fails with:
Appscript::CommandError: CommandError OSERROR: -10000 MESSAGE: Apple event handler failed.
any ideas what I'm doing wrong?
D'Oh. The enabledNotifications should be an Array, not just a string.