Sounds very positive and enthusiastic, thank you. But the given examples are not complete and there are even more windows with different consistent part names. And if I am not able to target these by myself and need to ask for support over and over again I fear it doesn't provide the right balance between effort and effect. Neither for you nor for me.
You are absolutely right. And a bit of RegEx basic knowledge is very helpful (read: indispensable) if you do scripting in whatever form.
Just learn as much as you need. With pretty basic knowledge you’ll be able to cover many common situations. The learn/profit ratio is extremely good at the beginning.
Here some tools:
- Learning and comprehensive reference: Regular Expressions Info
- Specific reference for the RegEx flavor used by KM: ICU Regular Expression Reference
- Testing tool and playground: regex101
And the conditions are still the same as at the beginning, right? […]
Basically yes but the ideal case (and my initial goal) was to be able to have an individual specific macro palette for each of the different windows.
With the examples from above:
abc / 1234 : abc
:\s*\w+$
abc / 1234 : abc <Part 1>
<Part\s*\d+>
abc / 1234 : abc <Part 1 Controller>
<Part\s*\d+\s*Controller>
If the string Controller>
alone is already a sufficient criterion, then you can also do it with a simple “window title contains” condition.
abc / 1234 : abc <Part 1 Normal Element>
<Part\s*\d+\s*Normal\s*Element>
If the string Normal Element>
alone is already a sufficient criterion, then you can also do it with a simple “window title contains” condition.
abc / 1234 : abc <Part 1 FM Ope>
<Part\s*\d+\s*FM\s*Ope>
If the string FM Ope>
alone is already a sufficient criterion, then you can also do it with a simple “window title contains” condition.
Note:
The optional spaces \s*
are just there to make it more tolerant to typos, like Part1
, Part 1
, NormalElement
.
Since you don’t seem like a person who throws around typos, you can also replace them by simple spaces. (The less complex a RegEx is, the better the computing time.)
You see, with more concrete distinctions (macro groups) now, the Regular Expressions become simpler. The one from my first post was more complex because I had to match Part
followed by anything except FM Ope
.
I gave it another try, adapting exact your settings from the first screenshot. It recognises the window and shows the palette. But it only works with the setting "Shows palette until…".
These are two separate things. First part, the window must be identified by its title (what I am trying to help you with), then the second part with the specific palette behavior.
The way we identify the window title should not affect the second part, unless there is some bug involved.