• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Beginner's scripting Terminal questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beginner's scripting Terminal questions


  • Subject: Re: Beginner's scripting Terminal questions
  • From: Bill Briggs <email@hidden>
  • Date: Wed, 2 Mar 2005 12:13:18 -0400

At 9:40 AM -0600 3/2/05, Adam Wuellner wrote:
On Thu, 3 Mar 2005 04:16:54 +1300, Jamie Kahn Genet
<email@hidden> wrote:
 P.S. Thanks also to those who suggested using saved .term files. But I
 needed something that would work with the AS menu. Pity I can't put
 anything but scripts in there.

Not to belabor the point, but what I was getting at was creating a term file once, that you could then

tell application "Finder"
	open alias "path:to:terminalfile.term"
end tell

tell application "Terminal"
	-- do stuff in the terminal windows
end tell

You're working way too hard. You don't need to invoke AppleScript to do any of the custom Terminal window stuff on launch, or to open a .term file.


Set up your windows in Terminal as you want them, then choose Save As from the menu. In your Documents folder make a folder called CustomShell, and save with the default name (SeeShell1.term - it'll add the extension for you). Check the box in the Save Dialog that says "open this file when Terminal starts up". It's a plist file for Terminal, and when you launch Terminal thereafter, your windows will come up as they were when you "saved them". No need to invoke any AppleScript at all. No need to go after the .term file explicitly. Terminal looks after that on launch.

If you want to set a different execution string for each on launch, just open the .term file in the Property List Editor (included with the Dev Tools) and set the execution string. If you don't mind reading raw XML, open the file in a text editor.

I haven't played with all of the settings, but presumably you can alter most, if not all, of the settings to suit your own personal taste.

I open three windows, all of them black, ever so slightly see-through (so I know what's below), and one of them has green text for nostalgic reasons (the way our terminals looked here in 1978). All settings are honoured when I open Terminal. No other action required.

- web
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Beginner's scripting Terminal questions (From: Andrew Oliver <email@hidden>)
 >Re: Beginner's scripting Terminal questions (From: email@hidden (Jamie Kahn Genet))
 >Re: Beginner's scripting Terminal questions (From: Adam Wuellner <email@hidden>)

  • Prev by Date: RE: About integers
  • Next by Date: RE: About integers
  • Previous by thread: Re: Beginner's scripting Terminal questions
  • Next by thread: Re: Beginner's scripting Terminal questions
  • Index(es):
    • Date
    • Thread