2
我有一個自動工作流程與Run Applescript
行動。是否可以在我的Run Applescript
中啓用/禁用/刪除另一個自動操作? See my previous question for more details。automator啓用/禁用/刪除操作在運行蘋果腳本
編輯:我已經開始賞金了。我正在尋找使我能夠在Automator應用程序中執行此操作的問題。
我有一個自動工作流程與Run Applescript
行動。是否可以在我的Run Applescript
中啓用/禁用/刪除另一個自動操作? See my previous question for more details。automator啓用/禁用/刪除操作在運行蘋果腳本
編輯:我已經開始賞金了。我正在尋找使我能夠在Automator應用程序中執行此操作的問題。
我不知道的一種方式的Automator的應用內做到這一點,但是這給一個嘗試 - 在下面的例子中工作流程切換動作之後它enabled屬性的腳本。用3個動作創建一個新的工作流程:
1)an 詢問文本動作獲取一些輸入;
2)運行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)要求確認行動提出了一個對話框(或沒有)。
您可以使用其他操作屬性,例如名稱,但如果存在多個相同的操作,則索引或id的效果會更好。
我該如何參考automator action的名字? 我試過了:告訴Automator操作名稱前面的工作流程的「新文本文件」設置啓用啓用 – Noah