No, that is not correct - you can use that macro via the Execute Macro action, you just cannot trigger it via the Typed String trigger from Keyboard Maestro’s typing.
So in your Test Payroll example, remove -sdy from your Insert Text "Gentlemen…" action, and after that action include an Execute Macro "whatever the sdy Macro is Called".
Sorry to be so much trouble, I greatly appreciate your patience!
To explain, I've migrated many little TE snippets to KM macros and where I could expand many of them using a single macro, I did (see example below). So while I understand your recommendation of triggering a specific macro from another macro to determine a date in my preferred format, for example, I don't want to recreate again a number of small individual macros. That's why I'd like to trigger the macro using the particular string. Using the Execute a Macro (adjusted with the gear) with a parameter should be just what I need!
Keyboard Maestro “Days of the Week & Dates of Days (Past & Future)” Macro
I’m happy to share, especially considering all the assistance I’ve received here! Perhaps someone will be able to come up with the correct regular expression to properly capture the typed string triggers as I’m new to that too and haven’t been able to develop a working regex. I know this one fails:
Yeah, I see I confused the results of the %TriggerValue% and %Trigger%. I lucked out as I used contains to check it, but I’ll change it before posting.
Now that’s truly impressive! I’ll examine how I might incorporate your approach into mine, but will post it to the macro category as is since Peter suggested it.
No need to over complicate it, this clearly explains your intentions - case insensitive, one of these, one of those, end in dy. I’m not sure why you want it case insensitive, but maybe your macro does different things with different case letters, I didn’t check that closely.
the ^ at the front is not necessary, Keyboard Maestro will always match to the end of whatever you have typed.
[+|-] is both wrong and invalid. [] contains a set of characters, so the | is not needed. And - can only be the first character otherwise it starts a range (as in [a-z]). So if you wanted a-z and hyphen, then you would do [-a-z]. In this case you would use [-+] (not [±]).
Your post makes coming up with the regex seem so easy, but I was just struggling seeing that! I like the way your bullets break it down, so I’ll need to be sure to write what I want from the regex that way going forward.
However, if I’m understanding, I think (|-|–|+|+) should be (|-|–|+|++) so that both pluses could be captured to find the ++ option entry.
It is the way you need to think about regex when you make them - which coincidently is very similar to the way you need to think about a macro when you make it.
Yes, I missed a + - and you need the \ before the + because + means "one or more" of the preceding item.