Re: Running VPN client...
Re: Running VPN client...
- Subject: Re: Running VPN client...
- From: Emmanuel <email@hidden>
- Date: Sun, 13 Jul 2003 12:26:14 +0200
At 6:59 PM -0700 12/07/03, Christopher Nebel wrote:
>
On Friday, July 11, 2003, at 10:06 AM, Emmanuel wrote:
>
>
>I think that if you append " &" to the command, "do shell script" will return immediately.
>
>
No, it won't. You need some additional magic thanks to the wonders of Unix pipes. Read <http://developer.apple.com/technotes/tn2002/tn2065.html> for the full solution.
I think you mean specifically:
<
http://developer.apple.com/technotes/tn2002/tn2065.html#Section5>
Thanks much for the correction. Appending " &" as I said is not a good idea, *don't do it*.
So, am I not correct here:
I think that if you append " > file_path &" to the command, "do shell script" will return immediately.
Closely related to that topic, I would suggest a short additional Q&A in Section 5 (I would say, as the 5th Q&A) such as:
--------------------------------
Q: I've started a background process: how can my script test whether the process is complete?
A: Use "ps" to get the list of the processes:
set still_running to (my_command is in do shell script "ps -xw")
--------------------------------
With Smile, you can very simply pool the process without hanging the application:
--------------------------------
repeat while the_command is in do shell script "ps -xw"
smilepause 0.1 -- keeps the machine responsive
end
--------------------------------
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.