Macro to change style or color of text before I type it?

That is not that surprising, since each app can, and does, handle the paste differently.
You can use the KM Switch or Case action based on the frontmost app (using the Frontmost Application Token to modify the behavior as needed for each app.

Me too. FYI, here is what I had to use for Evernote:

image

Crazy behavior.

1 Like

Yes. I just tested it in Evernote, when the "space" gets pasted, Evernote adds an extra space before the pasted "space". Also, the font becomes "Times", although my default font in Evernote is "Helvetica Neue" and the `Apply Style to System Clipboard" action in KM sets to "Font → Unchanged".

BTW, thanks for showing me the Evernote twist. I did not see %Application%1% before and have now learned to use it. :grin:

I made this an independent macro so that I can call it by the "Execute a Macro" action.

1 Like

Very good. The KM Switch or Case action is very useful.

BTW, it is better to use "contains" rather then "matches", since "matches" invokes a Regex comparison.

image

But “contain” does not support “or” operation as RegEx does. Or does it support (but I don't know the syntax)?

You are correct. Sorry, I missed the OR (alternate) symbol.
So, using "matches" is correct for your use case.

1 Like