Re: Script to run a command in new Terminal window works un-reliably.
Re: Script to run a command in new Terminal window works un-reliably.
- Subject: Re: Script to run a command in new Terminal window works un-reliably.
- From: Doug McNutt <email@hidden>
- Date: Thu, 27 Jul 2006 11:40:39 -0600
At 11:58 -0400 7/27/06, Andrei Tchijov wrote:
>Hi,
> Could some one take a look at the script below and tell me what could be wrong with it? The goal is to create new Terminal window and run a command in it. The script works most of the time, but once in a while, it will fail to do "run command" bit.
>
> Your comments will be highly appreciated.
I have a lot of those, once in a while, problems with scripting of Terminal. It appears as though, if you give terminal too much, in its opinion, to perform at one time it can quietly forget your instructions.
It's possible to name a terminal window so you can go back to it and not have Terminal forget about an environment you have set up (the way do shell script does.)
tell application "Terminal"
do script "cd somewhere" in window "theFirst"
do script "curl someURL -O" in window "theFirst"
end tell
(Off my head and without syntax checking) is quite likely to change the directory and simply return.
For some examples of what I have had to do (with proper syntax) :
<ftp://ftp.macnauchtan.com/Software/Progress/>
<ftp://ftp.macnauchtan.com/Software/Progress/tViewInit>
--
Applescript syntax is like English spelling:
Roughly, though not thoroughly, thought through.
_______________________________________________
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