« [Terminal]すべてのWindowにエスケープを送る | トップページ | スリープさせない »

[Terminal]ターミナルを終了させる


【スクリプトエディタで開く】|

################################
######ターミナルを終了させる
################################
tell application "Terminal"
  set numCntWindow to (count of (every window)) as integer
end tell
tell application "Terminal"
  set objWindow to (every window)
end tell
repeat with itemWindow in objWindow
  tell application "Terminal"
    tell itemWindow
      set frontmost to true
      delay 1
      tell application "System Events"
tell process "Terminal"
keystroke "c" using {control down}
keystroke "c" using {control down}
end tell
      end tell
    end tell
do script "exit" in itemWindow
do script "exit" in itemWindow
  end tell
end repeat
delay numCntWindow

tell application "Terminal"
  quit saving no
end tell


|

« [Terminal]すべてのWindowにエスケープを送る | トップページ | スリープさせない »

Terminal」カテゴリの記事