How do I stop macro continually running?


I have put together this macro (from bits and pieces I read on this forum - thank you) with the aim of stopping my backups from happening when I disconnect my laptop from power and reinstating the backup when I reconnect. Screenshot below.

This works, except that I noticed my battery draining much faster than usual and can see from Activity Monitor that the KM Engine is running out of control. If I disable the macro, it returns to normal, so I am guessing that KM is continually looking for the re-connect? But I don't know how I might stop this? I have disabled the macro until I can resolve it.

I wonder if anyone has any suggestions?

Thanks in advance.


Screenshot of macro:

A "While" action keeps repeating for as long as its condition(s) are met. Your machine is on battery, so it will try to quit IDrive, and try to quit IDrive, and try to quit IDrive... until you plug the power back in.

You don't need the "While" action. A simple

if I am on battery
   quit IDrive
   activate IDrive

...should do the trick.


Thank you so much.
I will give that a go and see what happens.
Now you say it it makes sense!