Using a remote web trigger like https://trigger.keyboardmaestro.com/t/BLA-BLA-BLA/0815-4711?TriggerValue
is fairly straightforward. However, even if I just want to trigger a macro on my home network, it sends an url request around the globe, while the machine next door waits for a response.
There should be a more direct way. But a public web trigger won't do it because this opens a web page. And a kmtrigger does not work, because – as far as I can tell – this works only on the same machine.
At least that is my understanding of the various explanation of these triggers. Am I missing something?
You can use a public web trigger to trigger a macro. It doesn't need to open a web page if you have the direct link to triggering the macro, and you can trigger it with curl for example to avoid involving a browser.
You could use Remote Apple Events if they are still a thing. Yes, it seems they are, at least they are still able to be enabled in the Sharing preferences. I can't remember how exactly you do remove Apple Events with AppleScript, but the info must be out there somewhere, so that's an option.
According to AI (so possibly completly wrong) it is:
tell application "Keyboard Maestro Engine" of machine "eppc://10.0.0.99"
do script "UUID"
end tell
The whole point is that this magic number is not the number you get for the remote web trigger,
but rather the number which you find under the various script options! And those are different.
And apparently, only this identifier of the macro works. The url does not work with the name of the macro.
I have to say the wiki entry on the public web trigger is not very helpful and clear in this respect.
For instance, all the examples there refer to localhost. But in this case, you would choose kmtrigger anyway.
I posted that question, because I was looking for a way to trigger macros from IOS devices.
On IOS neither AppleScript nor shell scripts are an option.
But the url works.