Pass a parameter as part of a URL

If there is a way to do this, this is a question. If not, it's a suggestion. :wink:

It would be very useful to be able to pass parameters to a macro in a URL. For example, I would like a URL something like:

kmtrigger://macro=MyMacro&value=dothing1

to execute MyMacro and pass it the parameter (set a variable to?) to dothing1.

I have a fairly long list of uses for this. Is there a way to do it? If not, does anybody have a good workaround?

It would be a very useful feature if it does not exist.

It looks like you're already aware of how it works, so maybe take a look at this page in the wiki, where's it's spelled out.

https://wiki.keyboardmaestro.com/trigger/URL

To get a macro's UUID, just use Edit > Copy as > Copy UUID.

You can reference the passed parameter as %TriggerValue%. For example:

2 Likes

Thanks much! I stopped with the User Manual, but should have dug deeper into the Wiki. (And one of these days will actually read through the collection of delightful tokens more carefully.) It's such an obvious thing that I halfway expected someone to tell me that I was blind.

1 Like