I was wondering if anyone could share any insights or hints or experience in improving the reliability of a macro with MacOS.
I have a macro that runs a series of edit commands and shell scripts and applescripts on hundreds of files. It runs fine in general, but it sometimes fails to close MacOS Pages or the previous window.
The macro is called from the BASH shell in a loop. It will run for a long time and then occasionally freeze up, since the function call to the macro fails to return when the macro fails to close its window or the Pages program after an iteration.
I've usually accounted for all the interaction with a busy OS by adding a lot of pauses before and after OS-intensive calls from KM. But before I use this brute force approach more and add a minute or more after every step, I thought I'd ask the forum here for some wisdom.
PS -- I'm calling the KM macro from the shell and offloading the Mac from other programs as much as practical, but I was wondering if there was a better and more dependable method of coding the loop inside of the single KM macro itself -- also with some wisdom