• 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: Make new window in Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make new window in Terminal


  • Subject: Re: Make new window in Terminal
  • From: Johnny AppleScript <email@hidden>
  • Date: Fri, 24 Sep 2004 12:02:19 -0600

Title: Re: Make new window in Terminal
On 04/09/24 11:24 AM, "Bill Briggs" <email@hidden> wrote:

>>
>> tell application "Terminal"
>> do script "ls"
>> end tell
>>
>> Opens a Terminal window and runs "ls"
>
> It's opening the second window that's the problem. (short of UI scripting)

I'm confused by this statement. Each occurrence of 'do script' will open a new terminal window OMM.

tell application "Terminal"
    
do script "ls" --
opens a new terminal window
   do script "ls" -- opens a second new terminal window
   set x to get windows
   do script "ls" in (item 1
of x) -- executes in the second window
   do script "ls" -- opens a third new terminal window
   set w to item 1 of (get windows)
    
do script "ls" in w --
executes in the third window
end tell

There’s lots more ways to figure out what windows are open, and whether to target the script there or  in a new window.

I’m guessing that’s not what you meant, though.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Make new window in Terminal
      • From: Bill Briggs <email@hidden>
References: 
 >Re: Make new window in Terminal (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: Make new window in Terminal
  • Next by Date: keystroke using ... { } ... in PowerMail
  • Previous by thread: Re: Make new window in Terminal
  • Next by thread: Re: Make new window in Terminal
  • Index(es):
    • Date
    • Thread