2011-11-15 52 views

回答

3

我不知道的一種方式的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的效果會更好。

+0

我該如何參考automator action的名字? 我試過了:告訴Automator操作名稱前面的工作流程的「新文本文件」設置啓用啓用 – Noah

相關問題