0

我正在尝试基于此示例 Applescript 代码从 Ruby/Appscript 咆哮:

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

我的代码如下所示:

GH = app("GrowlHelperApp.app")

enabledNotifications = "AppscriptMessage"

GH.register(:as_application => "AppscriptHelper",
    :all_notifications => enabledNotifications,
    :default_notifications => enabledNotifications)

最后一次通话失败:

Appscript::CommandError: CommandError OSERROR: -10000 MESSAGE: Apple 事件处理程序失败。

任何想法我做错了什么?

4

1 回答 1

0

哦。enabledNotifications 应该是一个数组,而不仅仅是一个字符串。

于 2009-08-17T16:26:28.770 回答