• 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: Scripting Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Scripting Terminal
      • From: "Stockly, Ed" <email@hidden>
References: 
 >Scripting Terminal (From: Paul Scott <email@hidden>)
 >Re: Scripting Terminal (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: *** OUT ***AppleScript-Users Digest, Vol 7, Issue 333
  • Next by Date: Re: Scripting Terminal
  • Previous by thread: Re: Scripting Terminal
  • Next by thread: Re: Scripting Terminal
  • Index(es):
    • Date
    • Thread