I'm working on a macro that will run one sequence in an audio editing program, and when that sequence is complete run another. The Pause Until Conditions Are Met function seems to be the best option here, but I'm struggling to understand how to control it.
What I want is for the macro to simply pause until a progress bar window in the audio application disappears, and then resume. (As only one condition needs to be met, I've set "Pause until" to "all of the conditions are met.") I've tried a number of the settings under Add Condition, and found one, Front Window Condition, that does pause where I want it to, but does not resume.
If the Variable Condition setting seems best, please be as precise as possible with the settings as I don't know how to use that one.
Fair request. I can think of four possible approaches off the top of my head. They all have advantages and disadvantages.
Firstly, probably bestly, what is the progress measuring? Is it measuring the creation of a file? If so, you could perhaps implement a check on whether the file is created and closed. That would probably be the most elegant solution.
Secondly, you didn't mention what the program is, so we can't tell if the program is compatible with AppleScript, but if it is, there may be a hook that KM can use to determine if the window is gone.
If these two approaches work for you, I have two other approaches that will probably work but are less efficient and could be prone to certain kinds of errors.
Firstly, you could use a "Pause Until Find Image is not found" approach. You would have to capture part of the progress bar window. Since I can't see the window, I can't tell you how effective that will be.
Secondly, if the progress bar contains certain words, you could use this interesting approach:
Of course this approach requires that your progress bar contains a word in it that you can rely on. Or maybe it could rely on a word that appears AFTER the progress bar disappears. This is all possible, but since I can't see your app, I can't say for sure.
What software is it and what process are you pausing for?
Often, one or more menu items will become unavailable while certain processes are being carried out. Have a look at your menus and see if anything is greyed out while the progress bar is onscreen. If so, you can use that as a condition in the pause action.
Hi, Thanks for your replies. The program in question is called Amadeus Pro. The function I'm using there involves a plug-in, which, once its completed its task, simply disappears without leaving any response text or the like. And, once the plug-in is triggered all functions within the program are available.
I did attempt to use the OCR condition Airy suggests. Under this, while the first process is executing the second one lies in wait, displaying a text line (which I've never seen before) that reads "Wait for previous tasks to finish." I need to do some more testing on it, but thus far this appears to do exactly what I've been looking for.
I have one remaining question for now. Within the OCR sub-drop-down for Language I've been unable to find a listing for Apple Text Recognition. My substitute selection of English seems to work, but do you have an idea of why the Apple Text Recognition is not listed? It's possible it's a version matter, as I'm using 9.0.3.
I believe you require KM v11.0.1 and macOS 10.15.