0
我有一个automator工作流程。如何使其在if
语句中重新启动工作流?automator applescript重启工作流程
on run {input, parameters}
if (input as text) is "" then
-- restart workflow
end if
return input
end run
我有一个automator工作流程。如何使其在if
语句中重新启动工作流?automator applescript重启工作流程
on run {input, parameters}
if (input as text) is "" then
-- restart workflow
end if
return input
end run
没有AppleScript的
在Automator的工作流程结束后,把Loop
。 (Loop
在Library > Utilities
)Loop
有一个选项Ask to Continue
。如果用户点击Continue
,Automator将重启工作流程。如果不是,将执行Loop
之后的下一个进程。
使用AppleScript
在Automator的工作流程结束后,把Run AppleScript
和Loop
。将Loop
选项设置为Loop automatically
和Stop After
times
。 AppleScript代码如下。
on run {input, parameters}
if (input as text) is "" then
tell me to quit
end if
return input
end run
后面的选择可以重复不超过1000次。
'if'之前/之后的任何命令? – wannik
@wannik在if之前/之后没有命令。 – gadgetmo