Waldie Many Apple Scripts do not provide progress updates to the user during processing.Most of the time, when a script is run, it simply performs the appropriate tasks "behind the scenes," so to speak.)Here's what currently happens:• User clicks a button which runs a script on a remote machine• A progress bar for the user appears and continually updates in the UI of my app (repeat loop for 5 mins)• User cannot do anything else in my app until the repeat loop completes Here's what I want to happen:• User clicks a button which runs a script on a remote machine• A progress bar for the user appears and continually updates in the UI of my app (repeat loop for 5 mins)• Progress bar runs on a timer, self-updating • User is free to do other things in the app (click more buttons, run other scripts) while the progress bar is updating Any help, or a nudge in the right direction would be appreciated very much!! You can go close by using an NSTimer to update progress bar.But there is a limit, in that there is only one instance of Apple Script for your application, and it can only do one thing at a time.Unfortunately, I am not having much luck doing this in Apple Script Obj C.What I would like to do seems fairly simple (those are always the hardest, right?In this month's column, we will walk through the process of creating a script that will provide visual progress information to the user during processing.
However, there are situations when providing such feedback is a good idea.
So I just increment the progress indicator by that amount, after subtracting how much progress has been made so far. But it has in flaw: it only works well for strings up to 100 characters.
This has the advantage of working at any reading speed, it's a lot less code, and I think it's more in the spirit of what the challenge is trying to get us to do: to use delegate methods. So I tweaked it a little bit and now it works with strings of any length.
If run as an application, a script may appear in the Dock when launched.
However, this hardly provides detailed information to the user about what is actually occurring.