2 Replies Latest reply: Nov 9, 2009 3:21 AM by kaz219
kaz219 Level 1 (15 points)

does anybody knows how to do this? I tried:
set name of window 1 to "Title"
but I get:
Terminal got an error: Can’t set name of window to "Title".

This work with other applications. I'd like to avoid GUI scripting since I want to distribute this script to people running their macs in different languages...

MacBook Pro 17", Mac OS X (10.5.8)
  • Pierre L. Level 5 (4,235 points)
    Hi kaz219,

    Does the following script do what you are asking for?

    tell application "Terminal"
    tell settings set "Basic"
    set title displays device name to false
    set title displays shell path to false
    set title displays window size to false
    set title displays settings name to false
    set title displays custom title to true
    set custom title to "Title"
    end tell
    end tell

    For more information, have a look at Terminal's AppleScript dictionary.

    Hope it can help.
  • kaz219 Level 1 (15 points)
    yes, "set custom title to ..." was the line I was searching for.

    Thank you very much!