【问题标题】:automator applescript restart workflowautomator applescript 重新启动工作流程
【发布时间】:2011-12-27 17:45:05
【问题描述】:

我有一个自动化工作流程。如何让它在 if 语句中重新启动工作流?

on run {input, parameters}

if (input as text) is "" then
    -- restart workflow
end if

return input
end run

【问题讨论】:

  • if 之前/之后的任何命令?
  • @wannik 在if 之前/之后没有命令。

标签: applescript automator


【解决方案1】:

没有 AppleScript

在自动化工作流程的末尾,输入Loop。 (LoopLibrary > Utilities 中)Loop 有一个选项Ask to Continue。如果用户单击Continue,Automator 将重新启动工作流。如果没有,将执行Loop 之后的下一个进程。

使用 AppleScript

在 automator 工作流程的末尾,输入 Run AppleScriptLoop。将Loop 选项设置为Loop automaticallyStop After 1000 times。 AppleScript 代码如下。

on run {input, parameters}
    if (input as text) is "" then
        tell me to quit
    end if
    return input
end run

后一种选择可以重复不超过1000次。

【讨论】:

    猜你喜欢
    • 2020-04-30
    • 1970-01-01
    • 2010-12-27
    • 1970-01-01
    • 2013-08-21
    • 2013-10-06
    • 2010-11-04
    • 2015-08-13
    • 1970-01-01
    相关资源
    最近更新 更多