Re: Make New Window in Terminal...
Re: Make New Window in Terminal...
- Subject: Re: Make New Window in Terminal...
- From: David Crowe <email@hidden>
- Date: Sat, 25 Sep 2004 10:08:06 -0600
Andrew;
I have found that running scripts in the background is difficult to
make work with "do shell script". Besides, if you want to see the
status of the process it's a lot easier to open the terminal window.
Since my script can automatically hide the Terminal application I
hardly know it's there.
I think what I am going to do is to give the window for my particular
application a particular name and then, when running the script,
check to see if that window exists, and then use it. If not I will
just run the script without specifying a window which will cause
Terminal to create one. This also avoids me running ssh in a window
where I was in the midst of doing something else.
- David Crowe
At 5:18 PM -0700 9/24/04, Andrew Oliver wrote:
On 9/24/04 1:48 PM, "David Crowe" <email@hidden> wrote:
Half the time after posting to this email list I feel dumb ... like now.
I was performing my script in Window 1 to avoid a proliferation of
windows. That works great if there is a window 1.
Beware!
This is all well and good provided you know what window 1 is doing.
However, you're royally screwed is window 1 is doing something else - like
maybe it's got an open ssh session to another machine, in which case you
start blindly running your 'do script's on some other machine. Bad. Very
bad.
I guess what I should do is run my script in a window with a
particular name and then check for that name and, if a window with
that name exists, use it, otherwise just run the script and let it
create a new window.
Well, if you really need to run in in the terminal at all[1] you may find it
better to run your first command as a 'do script', letting it open a new
window, then run subsequent 'do script' commands with an associated 'in
window x' to send them to the same place. That way you're guaranteed to not
walk all over some other terminal process.
[1] I may have missed an earlier part of the discussion where you stated the
need to use terminal.app rather than 'do shell script'.
_______________________________________________
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