automator applescript if then action [英] automator applescript if then action
问题描述
在 Automator 中,您可以像这样执行 Run Applescript
:
In Automator, can you do a Run Applescript
like this:
if
然后是一个动作,然后是一个 Run Applescript
像这样:
then an action, then a Run Applescript
like this:
end if
这可能吗?下面是一个例子:
Is this possible? Here is an example:
是的,我知道您可以让它退出 Applescript 中的应用程序,我不需要通过操作来执行此操作,但这只是一个示例.
Yes I know you can get it to quit an application in Applescript and I don't need to do this with an action, but this is just an example.
推荐答案
否 - 每个 Run AppleScript 动作(实际上是任何动作)都是一个单独的实例,因此您需要在相同的脚本.Automator 是可编写脚本的,因此您可以执行诸如启用/禁用操作之类的操作(我还没有尝试过,但操作的启用属性似乎是可设置的).
No - each Run AppleScript action (any action, actually) is a separate instance, so you will need to do your thing in the same script. Automator is scriptable, so you might be able to do something like enable/disable an action (I haven't tried it, but the enabled property of an action appears to be settable).
这篇关于automator applescript if then action的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!