Just bought a license for KM and successfully figured out a macro that fixed one of my persistent typing aggravations, mistyping “i” when I meant “I”. I had the macro always change the lower case instance when it was followed by a space. Works great, except this morning I discovered that I can no longer type HI without the “i” being capitalized (as you can see). Doh.
Thought of adding a space before the lower case “i” but then it wouldn’t work for starting a sentence with I.
Can someone help me figure out the necessary tweak to the macro to make it work properly? Thanks in advance.
Yes. That seems to work very nicely. I really appreciate the lightning response. Yours is quite a bit more sophisticated than my first attempt. I think I can learn from it. Thank you!
Thanks. I’m not really a coder but I recognize that you both used expressions to define your actions. Is that one language or another? Is there a listing or guide to those expressions you can point me to? Sorry for the bonehead question.
The OP said “i” in isolation, which I took to mean the singular personal pronoun “i” either at the beginning of a sentence or embedded within a sentence.
Personally I don’t worry about this, because the autocorrect dictionary in Typinator handles that sort of thing for me.
I noted a few minutes ago that my pattern screws up when adding “-i” switches to the command-line though – so I changed it to something more similar to yours:
Since no one else seems to have answered this question yet, I’ll take the liberty: those were regular expressions, and while different programming languages have different versions of them, they don’t belong to any particular language. You can find a listing of the regular expression syntax Keyboard Maestro supports here: Regular Expressions - ICU User Guide
and (one of many) tutorials here: Regular-Expressions.info
A very good starting point to Regular Expressions is the KM Wiki article about Regular Expressions. It explains the basics, gives you examples, and – if you scroll down – many very useful links.
@JeffH welcome to the forum. You’ll find lots of quick answers here of varying complexity from tons of helpful members. Regular expressions are crazy useful. Dig in to the links here and you’ll find many great uses for them. Again, welcome.
P.S.: If you think a post has solved your problem you can check the “Problem solved” checkbox at the bottom of the post that solved your problem.
This thread is a perfect example of one of my strengths or weaknesses, depending on who is judging. I will spend hours (even days) perfecting something that will save me 10 minutes a year, because I want it to be RIGHT. KBM caters to my strength or panders to my weakness - take your pick. I love it.