I have written a macro that opens Finder and seeks to access three directories on three remote hard disk drives. The macro works fine after the volumes have been previously accessed, however when the volumes have not been accessed for some time and the drives have stopped spinning the macro doesn't function as desired. Is there a way to cause the macro to pause until each desired external directory has become available?
This is the portion of the macro that needs to wait differing amounts of time depending on awakening the external drive:
Oops: Just noticed I used 'append results to variable.' You'd want to use 'save results to variable,' not append.
I haven't tested this for this particular use, but I use the if [ -d... construct all the time, and it works great. In this case, we run the shell command, pause for a second, then run it again, and repeat until the variable is set.
Repeat that block for the other two servers, and it should block execution until everything is mounted. Please test carefully before use if you're doing anything destructive!
I can't test my code directly, because I don't have multiple external hard drives, but have you considered this action for the "pause until all folders exist":