(* $Id: activate-presentation-terminal.scpt,v 1.1 2006/06/20 19:20:41 jmates Exp $ Bring presentation terminal to front, or prompt to open one. For more information, see: http://sial.org/howto/osx/present-term/ *) on run -- if possible, activate running presentation terminal and exit tell application "Terminal" repeat with win_id in windows if custom title of win_id is equal to "PTERM" then set frontmost of win_id to true activate return end if end repeat activate end tell -- prompt to open a presentation terminal tell application "System Events" get properties get every process tell process "Terminal" tell menu bar 1 pick menu item "Open…" of menu "File" end tell end tell end tell end run