This macro (and others like it) started failing a few weeks ago, maybe when I upgraded to Monterey. It's a time saver when it works, but now it doesn't. Any idea what's wrong? Is it a problem with the application? Doing the same thing from the context menu in Finder works, so I don't see why this does not.
Following on from my previous post I've now had a look at using %FinderSelections% and found that if you don't know in advance how many items you're going to select in Finder, the approach that should work for you is illustrated in this snippet:
which executes the action coloured Green as many times as there are items selected in the Finder window. In your case, therefore, you would replace the green action with the Open action and use %Variable%LocalSelectedItem% as the file to be opened. It may be that Affinity Photo won't be able to keep up with KM trying to open a number of files in quick succession so you might need to insert a Pause in the loop.
Some kind of confounding between the action and Affinity Photo (and Designer) I suppose. I haven't needed it for other apps, so haven't tested that. Oh well. I'll try one of the other solutions posted above. Thanks!