Re: Scripting Terminal
Re: Scripting Terminal
- Subject: Re: Scripting Terminal
- From: "Stockly, Ed" <email@hidden>
- Date: Fri, 25 Jun 2010 12:14:33 -0500
- Acceptlanguage: en-US
- Thread-topic: Scripting Terminal
>> Looking at Terminal's dictionary, "contents" appears only as a property of a
>> tab; that is, neither a window nor the application itself knows anything
>> about "contents".
>>
>> As a result, when asking for
>> contents of <variable>
>> you are just applying AppleScript's "contents" keyword to a variable.
>
> I get this. Not very object-like behavior. I guess I'm forcing a paradigm.
No, it's object-like behavior and you're not forcing anything, but there is
a terminology conflict in the terminal application's dictionary so the
object you're getting is not the object you're looking for.
Here's another way of looking at it. Your script is doing this:
set a to "b"
contents of a
-->"b"
Rather than returning the 'contents' property of the tab, it's returning the
'contents' of the variable, which in your script is all the properties of
the tab.
Every other tab property is available to your script from that variable,
using the approach you used, and the contents property should be, but isn't
directly.
The problem is that the 'contents' keyword is used by the application for
one thing and applescript for another.
That is a particular flavor of bug know as a Terminology Conflict.
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden