Author |
Topic |
|
YouraT
10 Posts |
Posted - 07/23/2013 : 03:30:27
|
Hi.
I have a PCB design application I use a lot, which has two different type of windows - schematic design and PCB design windows, differentiated mostly by the parent and owner titles. Both have the same file name identifiers, and I need to be able to do different things depending on whether it's a schematic or layout window that I'm currently over.
So - the Owner titles look like this:
Easy-PC 2000:SCM by Number One Systems - [C100 Phone.sch (Schematic Design)]
and
Easy-PC 2000:PCB by Number One Systems - [C100 Phone.pcb (PCB Design)]
depending on whether the schematic (SCM) or layout (PCB) tool are in use. The parent titles look the same as the Owner titles.
I've been trying to match the front or end bits with a pattern - i.e. the
Easy-PC 2000:SCM
and
Easy-PC 2000:PCB
or
(PCB Design) and (Schematic Design)
bits.
However, if I put
*2000:PCB*
in the Owner title pattern box, when the pattern is matched, Strokes Plus crashes completely, leaving me with a *very* unresponsive mouse until I can kill it properly in the OS pop-up.
*(PCB Design)*
has the same effect.
matching on the file name
EPCWin.exe
works, but doesn't allow me to distinguish the two types of window.
I'm using v2.7.1 on 64 bit Win7 Professional.
So - two things I guess.
1) How do I actually write the regex to match the two situations I need? 2) I'm assuming it shouldn't crash just because of a poorly written regex...
Any pointers?
Thanks,
Youra. |
|
Rob
USA
2615 Posts |
Posted - 07/23/2013 : 17:56:08
|
I'll have to look into the crash issue. But the regex pattern you'd likely want would be: .*2000:PCB.*
The dot represents any character, and the * following it indicates that any number of that (any character). Basically, that's how you wildcard: .*
|
|
|
YouraT
10 Posts |
Posted - 07/24/2013 : 02:51:50
|
Thanks Rob - that matches just fine. |
|
|
Rob
USA
2615 Posts |
Posted - 07/24/2013 : 09:34:22
|
Glad to hear! Whenever I identify the crash issue, I'll incorporate it into the code and make a release. |
|
|
Rob
USA
2615 Posts |
Posted - 07/27/2013 : 01:27:22
|
FYI, it appears to be a bug in the declaration of the regex pattern within the boost libraries; but only when * is the first character of the pattern. Adding a simple fix which replaces * with . (when * is the first character) for now since this is the only time it's come up. |
|
|
Rob
USA
2615 Posts |
Posted - 08/09/2013 : 06:43:21
|
By the way, I have fixed this in 2.7.2 |
|
|
YouraT
10 Posts |
Posted - 08/14/2013 : 08:14:22
|
And many thanks for both Strokes+ itself, and your excellent support |
|
|
|
Topic |
|