Progress Indicator Feature Request

The problem is simple: if you run one script within another (with AppleScript function “run script” or beautiful DT function “perform smart rule”) the Progress Indicator of inner script resets the Progress Indicator of outer script… and after the first repeat cycle outer script continues without any progress indication, - which is a pretty strange behavior (

IMHO, a good solution would be to start a new instance of Progress Indicator for inner script (not reset the current one).

A slightly worse solution would be to ignore any progress indicator commands for scripts called by “perform smart rule” function.

It is suggested not to use things like progress indicators in smart rules.

It is used widely by Smart Rules scripts written by DEVONtech team themselves… even if I myself will drop using it, but why should I? It is very handy if your process is lengthy, to see what’s going on and when it will possibly finish

Yes, I can delete the counter from the inner script, but it’s a workaround, not a solution, which will require to create a new script without counter. So, every such script must be in two versions… Not good.

It is used widely by Smart Rules scripts written by DEVONtech team themselves

For example…?

All scripts, that may take a while. Of course, no need for progress bar if script is small and quick. Take these two, written by @cgrunenberg:

  • Download Bibliographic Metadata
  • Validate All Bookmarks

But why do you ask it? Would my request loose its meaning if no one used it in smart rules scripts before?

I ask because it’s my job to ask questions. :slight_smile:

Also, I don’t think you’re talking about the saem thing here.
You said you’re calling a script from within a script. That is not the same as running a single script via Execute Script > External. @cgrunenberg would have to assess this.

Not sure what is

But I meant a simple thing: when e.g. you use a function like:

perform smart rule name "Download Bibliographic Metadata" record theRecord

in a script, which already uses progress indicator. So, in the first repeat cycle of my script this smart rule script (“Download Bibliographic Metadata”) will hide the Progress Indicator and all remaining cycles of my script will continue without Progress Indicator. That’s it.

Sorry, if my first post was not as clear.
I appreciate your work in any case :wink:

No worries. It’s definitely not a common case. Christian will have to take a look at this after the Easter holiday.
:slight_smile:

There’s only one global progress indicator right now for scripts, just like in version 2. DEVONthink just executes the scripts but due to technical limitations of AppleScript & Cocoa doesn’t know whether you execute other scripts in your script or not and wouldn’t even know which one uses the progress indicator. The easiest solution is currently to revise your scripts so that only one of them uses the indicator.

Thanks, but it will duplicate some scripts in need to have a version without progress indicator.

Is it possible technically/feasible to make “perform smart rule” function ignore all progress indicator commands?

BTW, this is the way to know if we run script inside script - if we use “perform smart rule”

How does the smart rule and the scripts actually look like?

I mean the AppleScript function “perform smart rule” may be programmed (or may not?) to ignore any progress indicator commands in the script tied to this rule. So if you use this function in the script, it will not run PI commands from the script it contains (if any) or other subsequent scripts called from it. Of course if it is possible - I don’t know

It’s possible and might be changed in future releases but in the near future lots of other things have a higher priority to be honest.