• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running VPN client...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Running VPN client...
      • From: Christopher Nebel <email@hidden>
References: 
 >Running VPN client... (From: David Crowe <email@hidden>)
 >Re: Running VPN client... (From: Emmanuel <email@hidden>)
 >Re: Running VPN client... (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Eudora Help, Please
  • Next by Date: Looking for guys interested in a project
  • Previous by thread: Re: Running VPN client...
  • Next by thread: Re: Running VPN client...
  • Index(es):
    • Date
    • Thread