【发布时间】:2011-11-19 00:10:39
【问题描述】:
我有一个带有Run Applescript 操作的自动化工作流程。是否可以在我的Run Applescript 中启用/禁用/删除另一个自动化操作? See my previous question for more details.
编辑:我已经开始赏金了。我正在寻找能够让我在 Automator 应用程序中执行此操作的问题。
【问题讨论】:
标签: applescript automator
我有一个带有Run Applescript 操作的自动化工作流程。是否可以在我的Run Applescript 中启用/禁用/删除另一个自动化操作? See my previous question for more details.
编辑:我已经开始赏金了。我正在寻找能够让我在 Automator 应用程序中执行此操作的问题。
【问题讨论】:
标签: applescript automator
我不知道在 Automator 应用程序 中执行此操作的方法,但请尝试一下 - 以下示例 workflow 中的脚本切换启用的属性其后的动作。使用 3 个操作创建一个新工作流:
1) Ask for Text 操作以获得一些输入;
2) 一个 Run AppleScript 动作来测试输入并做一些事情:
on run {input, parameters}
if (input as text) is "" then -- if no input then disable the following action
set currentAction to index of current action of front workflow -- the most recent completed action
tell Automator action index (currentAction + 2) of front workflow to set enabled to not enabled
end if
return input
end run
3) 一个 Ask for Confirmation 操作以建立一个对话框(或不建立)。
您可以使用其他操作属性,例如名称,但如果有多个相同的操作,则索引或 ID 效果更好。
【讨论】: