Insert COLORED text by typing

Hello, everyone!
Is there a way to make KM insert a colored text in a simple macro triggered by a string of characters?

You mean so?

Text Color Macros.kmmacros (43,4 KB)

Color

Well, not exactly. Let’s say the string ‚bga ' (b-g-a-space) triggers a simple text macro which results in inserting in my text the words ‚big green apple’. AND I want the automatically written words to be GREEN (and at the end return to the default black font).

Hi @Vladis, unfortunately my English is not so good (Google Translate).

So you want to insert a fixed text in green and then continue writing with black?
If so...

I don't know much about KM. But if you use TextExpander (maybe a-Text, Typinator etc.) like me, then it will work :wink:

Mai 2018 um 23:47:51

I was asked.. "the change of color and italic font is also possible while writing and afterwards again in black :thinking:"

Yes, this is possible with Keyboard Maestro and TextExpander (or others) :wink:

Thanks a lot for your suggestions! In the meantime I found the solution which is so simple that I feel embarrassed I didn't get it earlier. In Pages (or Numbers)

  1. Set the shortcut to font style 'none' as eg. F1
  2. Create a new style, eg. Green
  3. Set the shortcut to it, eg. F2
    Now in KM
  4. create a new macro triggered by a string, eg. 'bga'
  5. add action 'type the F2 Keystroke'
  6. add action "Insert text by typing' - eg. 'a big green apple'
  7. add action 'type the F1 Keystroke'

The above results in changing the font color to green, typing a desired text (in green) and returning to 'no style' ie. the default font style.

Thanks again!

Vladis

1 Like