Change text color in Mail mac

I use the Apple Mail program and every day need to change selected text to black. Does anyone have a KB macro that will accomplish this?

Here you go:

Style Text Black.kmmacros (2.8 KB)

The key is the checked "Foreground" color in the "Apple Style to System Clipboard" action. In addition to Mail, this kind of macro will work in most apps that use rich text (offhand the only exceptions I know of are the Office apps, which use their own weird clipboard implementations, but there may be others). The two Delete Clipboard actions at the end are to keep the copied and changed text out of KM's clipboard history; if you don't mind and/or want text you style with this to remain there, you can delete or disable them with no adverse effects.

Thanks, I used option b, then control b and it did not change it to black text. Option b just bolded it.

Jeff

Do you mean after you set the macro to use those shortcuts as triggers? It seems to work just fine for me with those:

Style Text Black.kmmacros (3.3 KB)

If the macro is disabled, or set to not use those shortcuts as triggers, Option-B also doesn't bold the text for me, but replaces it with this character: ∫
Maybe something else on your system is interfering?

/Still, nothing.

Jeff

I’m afraid I don’t know what to tell you then, since the macro continues to work fine for me. Assuming you enabled the macro (imported macros are disabled by default in KM8), and it’s in a macro group that’s enabled and active in Mail, I can’t begin to guess what might be going wrong without more details (like, say, a screenshot of how you have the macro set up).

I can see the issue with the ∫ character, since option-B is how you type that character.

I put the macro in a folder that restricts the macro to work in Mail, and it works fine then.


Not sure if that will help you, but it works for me.

I’ll give it a shot, thanks!

Jeff

I tried it but there is no change to the text. It does not turn black as hoped. Any other ideas?

Here's what it looks like on my screen

Right now you're only copying and styling the text. All you need to do to make it work is paste the newly styled clipboard after it's been changed to black:

Perfect! All it was missing was the paste! Thanks again.

OK, so that works but now another of my macros doesn’t work like it did. Before it pasted a formatted letter into an email and now the formatting is gone! Any ideas? I tried restarting the computer but no go on fixing it.

Offhand, I can’t imagine why this new macro would interfere with another one. Can you upload/post screenshots of both macros so we can see how you have each one set up?

This is the new one that changes the selected text to black:

These three make up the one that's not working now:


I know, it’s a monstrosity!

That helps, but I don’t see any specially formatted letters, and I also don’t see anything that could be receiving interference from the new macro. What about screenshots of what the pasted text is supposed to look like, and what it looks like now?

Jeff -

You need to add a Paste at the end…the text is being copied and formatted, but you are not pasting it back into the Mail message.
Try that.

Thanks!
Jacques

This is what it's supposed to look like. It pastes in the subject line and then everything in the body up to,"Thanks in Advance, Jeff

This is what it looks like now:

I'm afraid I still have no idea why the new macro would be interfering with the line breaks here, but in the meantime, here's an alternative way of accomplishing the same task that should hopefully avoid the problem:

Your completion letter .5.kmmacros (4.5 KB)

I assumed that the ⌘V action near the top was to paste an email address in the To field, so instead of replicating that I've substituted KM's %SystemClipboard% token, which should achieve the same result. Likewise, the %|% token after "Hey" is used to position the cursor once the message has been created, eliminating the need to simulate typing Up and Right so many times. The only thing you should need to do here is make sure that the "Send Mail Message" action uses the email address and signature that you want, since I obviously can't set those up on my system.