Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress indicators and "do shell script" Freeze



On Monday, December 1, 2003, at 08:26 AM, Christopher Hickman wrote:

On Monday, December 1, 2003, at 09:36 AM, Scott C. Brown 02 wrote:

--- Joris de Beer <email@hidden> wrote: ---
Apple have a page discussing this at:

http://developer.apple.com/technotes/tn2002/tn2065.html

The basic deal is that you can start a shell script but have it return something other than a result, such as it's process id (pid). Then you check something using a loop, a log file perhaps
--- end of quote ---

i've found that directing output to a file and reading that (like the apple documentation on "do shell script") makes things a LOT slower, so much so that it isn't worth doing

In that case, you may be left with little else to do but wrap an NSTask to do what you need to do.

I've found NSTask to be excellent. Another option, perhaps for the future in this particular case, is 'expect'. Unfortunately only included in MacOS X starting with with 10.3. There is a man page for it. The home page has links to examples: <http://expect.nist.gov/>.


Philip Aker
http://www.aker.ca
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Progress indicators and "do shell script" Freeze (From: Christopher Hickman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.