Re: Scripting Terminal
Re: Scripting Terminal
- Subject: Re: Scripting Terminal
- From: Paul Scott <email@hidden>
- Date: Fri, 25 Jun 2010 07:32:22 -0700
On Jun 25, 2010, at 2:46 AM, Axel Luttgens wrote:
>> set s to contents of t
>
> Hello Paul,
>
> 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.
> BTW, here again, it is worth to check whether that intermediary "t" variable is really needed;
Yes, it is needed. In the real script (not the one I provided) I have a variable called w for window, which is also needed. The reason for the variables is that once I initiate the script in a tab it should not effect other tabs or windows in Terminal, even if they become current or frontmost. Using 'front window" or "current tab" directly will foul things up. I need the original values, not the current ones. The demonstration script I provided doesn't consider this; it was designed only to elucidate the problem of "contents of".
Thanks,
Paul
_______________________________________________
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