Re: Creating a Progress Bar, is it possible?
Re: Creating a Progress Bar, is it possible?
- Subject: Re: Creating a Progress Bar, is it possible?
- From: Rob Morton <email@hidden>
- Date: Wed, 30 Apr 2003 16:11:03 -0400
Sure is possible, but your best bet is to do one of two things...
One, learn AppleScript Studio and play with its progress bar. This is not
that great to be honest in that you have to trick feedback from the shell
command.
Two, the much less clean methods would be to redirect the output of the asr
command to a file, and open a terminal window to watch the progress of that
output. This can be done by adding something like...
--Do you want to watch the tasks output in a terminal window?
if WatchTasks then
do shell script ("touch " & CompleteLogFile)
ignoring application responses
tell application "Terminal" to do script ("tail -f " &
CompleteLogFile)
end ignoring
end if
where WatchTask can either always be true, you could ask if they want to
watch, or a check box in AppleScript Studio. CompleteLogFile would be the
UNIX path to where you want to store this file (I would suggest
/tmp/asr.log)
Your asr command would look like...
do shell script ("/usr/sbin/asr -source " & imagePath & " -target " &
destinationPath & " -erase -noprompt >> " & CompleteLogFile)
all on one line.
Seem logicalish?
Rob Morton
on 4/30/03 2:29 PM, Courtney Moore at email@hidden wrote:
>
I have created an apple script that will automate the ASR process using the
>
Terminal. Since this process can be lengthy I would like a progress bar to
>
be displayed while the ASR process is running. Is anyone familiar with how
>
to do this or if this is even possible?
>
>
Thanks!
>
>
Courtney
>
_______________________________________________
>
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.
_______________________________________________
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.