I have noticed that when I run this script when there are a lot of alerts open that only some of the alerts close. If I run the script again, more of the alerts close and so on and so forth until they all close.
I dont really have a good grasp of apple script, but it almost seems as though the repeat loop is misbehaving in the following way:
Assume there are 10 alerts open and they are each indexed 0 ... 9
The 0th one is closed
The remaining alerts are re-indexed 0 ... 8
The 1th one is closed (note that we have now skipped the new 0th alert)
The remaining alerts are re-indexed 0 ... 7
The 2th one is closed (note that we have now skipped the new 0th and 1th alert)
I have noticed that when I run this script when there are a lot of alerts open that only some of the alerts close. If I run the script again, more of the alerts close and so on and so forth until they all close.
I dont really have a good grasp of apple script, but it almost seems as though the
repeat
loop is misbehaving in the following way: