Hello,
I was wondering if anyone could help me to build a macro that would capitalize the first letter of whatever is selected?
I also need one that un-capitalise the first letter of the selection.
That'd be awesome.
Thanks!
Hello,
I was wondering if anyone could help me to build a macro that would capitalize the first letter of whatever is selected?
I also need one that un-capitalise the first letter of the selection.
That'd be awesome.
Thanks!
KM has a Filter action that'll do what you want. Check out its manual page in the KM wiki: manual:Filters [Keyboard Maestro Wiki]
To illustrate - here's an example macro that toggles the case of the first character in the currently-selected text for you to try:
I've tested this in BBEdit. It should work in any text editor that permits copy/paste but I'm not sure it would preserve any text styles.
Even quicker -- KM has text case conversion, flagged by metacharacters. \u
converts the next character to uppercase, \l
to lower. So:
Cap 1st Letter.kmmacros (1.7 KB)
And:
Low 1st Letter.kmmacros (1.7 KB)
Quick bit of testing shows they keep at least simple formatting when used on styled text.
Beautiful.
Thank you so much stranger. you made my day
Have a good one,
thanks a lot for your help.
Hi, @Martin_RAISON. Here's a variant that:
Download: Toggle Sentence Case of Selection.kmmacros (12 KB)
I like it how you restore the selection.