Hi list! As new to the list and new to applescript, I've been reading some of the lastest threads, especially the ones concerning 'do shell script'
How do I run a program in the background, reading data from its stdout?
Googling, and looking in the threads has lead me into something like
1 - run the process in the background 2 - redirect stdout to a file 3 - read output from file
Now, say the background process writes percent completion of what it is doing to stdout. (redirected to known file)
What I want is a dialog, with a progress bar, that reads the percentage, and updates the progress bar.
is this something that will fit in an 'on idle' event?
on idle theObject --pseudocode if file exists then (shellscript removes file when background process done) read last row in file update progress bar return 1 else return 0 --reset idle handler? end if end idle
or is there a better place/event/method?
Another thing, is there a _good_ tutorial somewhere, or recommended reading?
/Björn
Björn Lundin bnl at spray dot se
|