request for two-level progress bar

I have a lot of scripts that do things along the lines of processing the items in multiple collections. At the moment, I just iterate through the collections counting up all the items and use that as the count for the progress bar. But I think it would map a lot better if I could have a major progress bar that corresponds to the number of collections and a minor progress bar that corresponds to the items of the current collection. This would be more than cosmetic as a lot of my scripts are for importing into DT and often times iterating a collection is non-trivial so counting up all the items can take quite a while before I can give the user a concrete progress indication.

On a related note, it would be useful to have a method like “step progress indicator” that updates the text but does not actually step the progress.

Thanks bunches

You could display the progress indicator for each collection. Here’s a simple example:


tell application "DEVONthink Pro"
	activate
	repeat with i from 1 to 3
		show progress indicator (i as string) & ". major" steps 10
		repeat with j from 1 to 10
			step progress indicator "Minor"
			delay 0.5
		end repeat
	end repeat
	hide progress indicator
end tell

Yeah, I’ve done stuff like that where counting all of the sub-items upfront just isn’t feasible. I’ll usually put a “(# of ##)” at the end of the major label in the progress indicator. But it just isn’t very elegant. :slight_smile: