[TxMt] Re: Open Terminal

Matt Neuburg matt at tidbits.com
Mon Apr 21 23:04:54 UTC 2008


On 4/21/08 8:36 AM, in article
0F70886B-FCF9-4318-A398-9D5CBA91F0B0 at macromates.com, "Allan Odgaard"
<throw-away-2 at macromates.com> wrote:

> On 17 Apr 2008, at 02:52, Mark Eli Kalderon wrote:
> 
>> Is there a way to modify the Open Terminal command so that it uses
>> tabs with Terminal.app? I have been trying to do this but my
>> applescript-fu is weak. :/
> 
> I see there is plenty of support for this in the scripting dictionary,
> but I also don¹t get AppleScript.
> 
> I tried first:
> 
>      tell app "Terminal" to return tabs of first window
> 
> This worked fine, so then I tried:
> 
>      tell app "Terminal" to make new tab in first window
> 
> That gave me:
> 
>      Terminal got an error: Can¹t make or move that element into that
> container. (-10024)
> 
> And then I gave up :)

Giving up is correct behavior! :))) The whole frustration with AppleScript
is that you have no way of knowing whether a feature is implemented ("Is it
possible to script the Terminal to make tabs in a window?") and, if so, what
the syntax is for making it happen.

I believe the matter at hand (unless I've misunderstood - I haven't really
been following along) has been pretty well discussed here:

http://onrails.org/articles/2007/11/28/scripting-the-leopard-terminal

m.

-- 
matt neuburg, phd = matt at tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>






More information about the textmate mailing list