Re: Make new window in Terminal
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