|
|
open & arrange terminal windows via applescript?
|
|
|
|
Mac Enthusiast
Join Date: Aug 2001
Location: planet express
Status:
Offline
|
|
folks... i know it�s a bad time to ask about anything else that quartz extreme and brushed metal, but since there is no way to arrange windows in the terminal (or basically in os x, for that matter) *automatically*, i�ve asked myself if you can write an appleskript which does the following:
- launch terminal.app
- open two windows (respectively or a second window) at certain size (eg. 30 rows 180 cols)
- arrange them so that they don�t overlap (what�s it called... tile?)
the idea is to have multiple terminal-windows opening up at one click without them overlapping.
probably it�s pretty easy, but i don�t know heck about appleskript yet... any ideas?
|
"And Zapp Brannigan, your score qualifies you as assistant delivery boy, second class."
"Hmm. I guess I'll have to sleep my way to the top. Kif, wake me when I'm there."
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Aug 2001
Location: planet express
Status:
Offline
|
|
hehe... now that someone took a heart and closed all the superflous quartz-threads... *bump*
|
"And Zapp Brannigan, your score qualifies you as assistant delivery boy, second class."
"Hmm. I guess I'll have to sleep my way to the top. Kif, wake me when I'm there."
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2002
Location: Hawaii
Status:
Offline
|
|
Not sure you can do it with AppleScript (I'm slow to learn it), but you can use .term files to open windows with the layout and other attributes you want. Easiest way to do that is set up windows as you like, then use the "Shell->Save As" menu item to create the .term file. Select "Open this file when Terminal starts up" and "What to save" to "All windows" if you want those options. Any .term files you save will be available under the "Shell->Library" menu, or you can double-click the icon to launch it, or use "open path-to-file.term"... and other clever ideas. The .term file is in XML format so you can have a look at it if you're curious. Oh, saving .term files in ~/Library/Application Support/Terminal is a recommended location.
Hope that helps. Now, back to this week's QE and BM threads...
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Terminal's Applescript functionality is somewhat broken, and will not let you set the location of new windows.
Apart from that, you can open new windows simply with
<font face = "courier">
tell application "Terminal"
activate
repeat with i from 1 to 2
do script with command ""
set number of rows of (window i) to 80
set number of columns of (window i) to 132
end repeat
end tell
</font>
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2002
Location: Hawaii
Status:
Offline
|
|
Thanks for the example... I now see what I was missing trying to make that work earlier.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Aug 2001
Location: planet express
Status:
Offline
|
|
yay.... worked perfectly with "save as.... .term"
thanks a lot!!!
|
"And Zapp Brannigan, your score qualifies you as assistant delivery boy, second class."
"Hmm. I guess I'll have to sleep my way to the top. Kif, wake me when I'm there."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|