First of all, I am completly new to Applescript!
My problem is that I use Applescript to run some commands in Terminal and want to quit Terminal when all the commandlines are finished executing. Currently I'm using only a delay of 5 sec, but this is not always enough. The execution of the command lines varies from 1 sec up to perhaps a minute.
I've been running a while loop to check if a specified process is active and then run a delay, but it is not enough.
So what I want is actually:
IF (Terminal is done executing) QUIT
ELSE (Wait untill done)
I've been searching the forums and seen that it might be possible to not run Terminal with Applescript (meaning do something like: tell application "Terminal".....) to run command lines. Anyone know anything about that?
My problem is that I use Applescript to run some commands in Terminal and want to quit Terminal when all the commandlines are finished executing. Currently I'm using only a delay of 5 sec, but this is not always enough. The execution of the command lines varies from 1 sec up to perhaps a minute.
I've been running a while loop to check if a specified process is active and then run a delay, but it is not enough.
So what I want is actually:
IF (Terminal is done executing) QUIT
ELSE (Wait untill done)
I've been searching the forums and seen that it might be possible to not run Terminal with Applescript (meaning do something like: tell application "Terminal".....) to run command lines. Anyone know anything about that?