1

ターミナルがまだ実行されていない場合にのみウィンドウを開き、それ以外の場合は開いているウィンドウにコマンドを入力するようにするには、どのような変更を加えますか? 制御フロー、条件付きジョーンを考えています。とはいえ、どうやって書き出すのかわからない。

ありがとう、TJ

スクリプトは次のとおりです。

on alfred_script(q)
    tell application "Terminal"
        activate
        do script q
    end tell
end alfred_script
4

2 に答える 2

3

試す:

on alfred_script(q)
tell application "Terminal"
    if not (exists window 1) then reopen
    activate
    do script q in window 1
end tell
end alfred_script
于 2014-03-10T01:36:55.627 に答える