• 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 10:20:17 -0600

Title: Re: Make new window in Terminal
On 04/09/24 10:06 AM, "Dave Balderstone" <email@hidden> wrote:

> You don't need to. It will open a new window automagically...
>
> tell application "Terminal"
> do script "ls"
> end tell
>
> Opens a Terminal window and runs "ls"

Sometimes if you don't care to open YA window you can:

tell application "Terminal"
    
set x to get windows
   
if x is {} then do script "ls"
    
if x is not {} then do script "ls" in (item 1 of x) -- always gets the front window
   -- also useful if you want to exclude certain windows that may always be open; by name, process, etc.
end tell
 _______________________________________________
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

References: 
 >Re: Make new window in Terminal (From: Dave Balderstone <email@hidden>)

  • Prev by Date: iBooks and AirPort/Cisco login
  • Next by Date: Re: Make new window in Terminal
  • Previous by thread: Re: Make new window in Terminal
  • Next by thread: Re: Make new window in Terminal
  • Index(es):
    • Date
    • Thread