Trigger a KM Macro depending on the value of a cell in the frontmost open Numbers spreadsheet?

Hello: Is there a way to trigger a KM Macro when the value of a cell of the frontmost Numbers spreadsheet either becomes equal to a given value or simply changes value?

When you say "trigger", (which has a specific meaning) the answer is "no" but you can in fact use KM to repeatedly "poll" the numbers spreadsheet every second (more or less) to see if the value has changed (ie, "not a certain value") or if the value has reached a target (ie, is a certain value.)

I'm not adept with AppleScript, but I think you would need to do something like this in a loop:

Then you can compare the result to a value of your choice.

Give this a try, but if you need more help, just ask.

Hello:

Thank you -peter49- for your reply. I thought this might be the case, but I am always amazed by the power of the KBM [11.0.4] & the creativity of the community, so I thought I would ask!

Thank you also -Airy- for your reply. Aware of -but not a heavy user of- the trigger feature in KBW, I thought “trigger” was the relevant term to describe what I was seeking to achieve i.e. that a KBM macro would be triggered/launched/run/executed/carried out (?) when a designated cell changes, as described. I am of course sorry if my choice of word caused confusion.

As for your thoughtful suggestion, as I am also not particularly a well versed user of AppleScript, I am not comfortable potentially setting up an infinite loop in KBM, which ever AppleScript or other steps are involved.

In light of these two helpful replies, instead I am going to see if tracking & trapping the action(s) which potentially could change the value of the “trigger cell”, and THEN check if the cell has changed and branch to the relevant other steps accordingly. I anticipate having to indeed use a loop -probably using “While Conditions met...”- that I would run only when interacting with the sections of the spreadsheet that could induce changes which may affect the “trigger cell”, paying particular attention to how it exits.

Thank you both again for your time.

Don't worry about that -- a deliberate infinite loop is completely different to an accidental one and, depending on how you set it, can use a minimal amount of the resources available to modern machines.

Perhaps if you explain how/why the cell will be updated and how quickly you want KM to react to that, someone can come up with some ideas.

Polling does not have to involve an infinite loop.