使用 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
gadgetmo 中的代码示例几乎是正确的,但无法像 Growl 1.4 一样工作。
应用程序必须注册并启用,并且必须提供它将呈现的通知列表以及启用了哪些通知的列表。
如果您只是劫持预配置的自动化设置,则可以跳过所有配置内容,如下所示。
需要注意的要点是通知名称为“Automator notification”,源应用程序为“Automator”。
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.
Key points to note are "Automator notification" as the name of the notification and "Automator" as the source application.
在
运行Applescript
中使用它:或者在此处下载。
您也可以将其与输入一起使用。
Use this in a
Run Applescript
:Or download it here.
You can also use this with input.
该操作仅传递输入,并且没有任何接受变量的文本字段,因此您需要手动输入所需的消息。 显示咆哮通知操作(位于GrowlHelperApp包内)确实使用AppleScript,因此您可以修改副本以执行诸如在消息字段为空时使用输入之类的操作。
The action just passes the input through, and doesn't have any text fields that accept variables, so you will need to manually put in the message you want. The Show Growl Notification action (located inside the GrowlHelperApp bundle) does use an AppleScript, so you could modify a copy to do something like use the input if the message field is blank.