使用Automator设置低吼通知的文本吗? [英] Set text of a Growl Notification using Automator?

查看:65
本文介绍了使用Automator设置低吼通知的文本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含动作"Show Growl Notification"的Automator应用程序,该动作在出现时始终为空.我已经尝试过直接使用获取指定的文本"和获取变量的值"操作,但是我尝试过的任何方法似乎都没有效果.

I have an Automator Application containing the action "Show Growl Notification", which is always empty when it appears. I've tried using the "Get Specified Text" and "Get Value Of Variable" actions directly before it, but nothing I've tried seems to work.

推荐答案

gadgetmo的代码示例几乎是正确的,但不能与Growl 1.4一起使用

The code sample from gadgetmo is almost correct but won't work as is with Growl 1.4

必须注册并启用应用程序,并且必须提供将要显示的通知列表,以及启用了哪些通知的列表.

An application must be registered and enabled and must provide a list of notifications it will present and also a list of which of those notifications are enabled.

如果您只是劫持预配置的自动化器设置,则可以跳过所有配置内容,如下所示.

You can skip all that config stuff if you just hijack the preconfigured automator settings as shown below.

要注意的要点是"Automator通知"作为通知的名称,"Automator"作为源应用程序.

Key points to note are "Automator notification" as the name of the notification and "Automator" as the source application.

tell application "System Events"
    set isRunning to (count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp")) > 0
end tell

if isRunning then
    tell application id "com.Growl.GrowlHelperApp"
        notify with name ¬
            "Automator notification" title ¬
            "Processing Files" description ¬
            input as text application name "Automator"
    end tell
end if

这篇关于使用Automator设置低吼通知的文本吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆