Yes, there is. See how the Menu Title field was "Mail" in the original macro? You need to use APPLICATION when selecting a menu in the front application with this action:
Incidentally, is there a particular reason you're using a service for this? If you're already highlighting the text containing the links anyway, I might consider making a macro that copies the text to the clipboard and opens each link like this:
But I have to say, that is one whale of a RegEx: (?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)
It seems to work fine in KM, but Regex101.com chokes on it, saying it doesn't like all of the \u metacharacters. I have no idea why.
I don't know if there is much of a speed penalty for a long RegEx like that, but I did find this one on stackoverflow.com that is much simpler, and seems to work in my testing: (http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?
Thanks, @JMichaelTX! I found that regex on StackOverflow too, but went with this one on GitHub mainly because it seemed like it would cover more edge cases. I know it's a lot longer and more complex, but in practice the speed difference seems negligible, so as long as it works in KM, I figured I might as well go with it. Still, as they say, there's almost always more than one way to handle things like this, especially when it comes to regex, so having more options to choose from absolutely can't hurt
I am creating a Services menu palette which works globally (not app specific). I reviewed your post above don't understand why this action does not work.
I tried Menu Title both Application and APPLICATION (like in your example), and I tried inverting menu item and submenu, but nothing works
If I replace Menu Title Application with the name of the application (example: Chrome), it works fine, so the problem seems to be with what I should write for Menu Title.
APPLICATION in all caps with Services as the submenu:
works for me in several apps I tested except for Chrome/Brave Browser, so I think the problem is most likely specific to Chrome. Given that, the way I'd get around this is to use a Switch/Case so that Chrome uses a specific action and every other app uses the generic APPLICATION:
Heh, yes, that's what happens when you only export actions rather than a full macro. Usually the full macro is the way to go, but as you've seen, sometimes all you need is the actions (though of course, if you don't know in advance that .kmactions files open in the macro currently being edited, it can lead to a bit of confusion at first).