Automator的AppleScript的,如果再行动 [英] automator applescript if then action
问题描述
在Automator的,你可以做一个运行AppleScript
是这样的:
In Automator, can you do a Run Applescript
like this:
if
然后一个动作,那么运行AppleScript
是这样的:
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.
推荐答案
没有 - 每个运行AppleScript 动作(任何动作,实际上)是一个单独的实例,所以你需要做的事情相同的脚本。的Automator编写脚本,所以你也许可以做到像启用/禁用一个动作(我还没有尝试过,但行动的enabled属性似乎设置)。
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的,如果再行动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!