I want to make a little Mac app that replaces some of Disk Utility’s buggy behavior: The Restore operation.
The user would choose a source and a destination volume, and then the app would invoke a command line tool (asr).
Since this tool can run for a long time, up to hours, I need to be able to show its progress.
I can have the tool print lines about its progress. I would need to be able to constantly poll the output of the shell invocation so that I can update my UI accordingly. Is that doable with AppleScript? AFAIK, Applescript only offers an atomic, synchronous, command for shell execution, so that’s not going to work, I guess. And doing it with NSTask seems to be quite complex, using an NSPipe and async handlers - probably not safe to use in AppleScript, either, right? Any ideas?