This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Bug and Issues
 New Bugs
 [Resolved] Parent Class Name Pattern
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

robertlzj

4 Posts

Posted - 09/04/2015 :  20:54:32  Show Profile
Original Subject: Parent Class Name Pattern not work for excluding

I use "^(?!#32770).*$" in "Parent Class Name Pattern" to exclude Save As dialog box of browser.
When Save As dialog box not existed, StrokesPlus works in browser.
But when Save As dialog box shows, StrokesPlus still works on the dialog box, which not expect.
And "Parent Title Pattern" could be used for excluding.
So, I think Parent Class Name Pattern not work for excluding.

Win7 64, lasted StrokePlus.

Edited by - robertlzj on 09/04/2015 22:52:18

Rob

USA
2615 Posts

Posted - 09/04/2015 :  21:20:20  Show Profile  Visit Rob's Homepage
Okay, there are a couple things to mention here.

1) I found a bug in the pattern declaration for Parent Class Name Pattern, so the first time a pattern was tested, no matter what you changed the pattern to, S+ would still use the initial pattern until you restart S+; in fact, it becomes static across ALL apps and ignored apps too. I fixed the rest of the pattern variables a long time ago, but I guess I missed that one

2) Are you wanting the Save As dialog to be completely ignored? Or do you simply want it to respond to Global Actions, NOT ones you have defined for Chrome? If that is the case, then "^(?!#32770).*$" in the Pattern Class Name for your Chrome app is correct. But the issue from #1 above is likely causing you major confusion.

3) If you do not want the Save As dialog to react to any gestures at all, you would simply need to create an Ignored app for it.

So, if you want the behavior of 2 above, save the pattern in the Parent Class Name Pattern field, close StrokesPlus, then reopen it and it should work fine. But note that any other Parent Class Name Pattern field used anywhere else will only be applying the regex above as it's defined as a static variable (I will be releasing an update shortly).
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/04/2015 :  21:29:47  Show Profile  Visit Rob's Homepage
I've uploaded version 2.8.6.0 to fix the bug. Let me know how things work out.
Go to Top of Page

robertlzj

4 Posts

Posted - 09/04/2015 :  21:53:00  Show Profile
2) I want it to respond to Global Actions.

2) / 3)
Thanks for your suggestion. I think it means an overwrite and priority of configure, ignored apps ¡ú uers-defined apps ¡ú predefined Global Actions for all other apps.

Tested, works fine. I use "^(?!#32770).*$" only in one App, so I am not sure about the "static variable" problem.

Thanks for the quick response.

In fact there is another problem, maybe not a bug, that right-click context menu in Explorer when holding Shift, it just can't pop-up, without pressing the Ingore key and release it as soon as menu pop.
Should I make a new topic?
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/04/2015 :  22:02:29  Show Profile  Visit Rob's Homepage
In fact there is another problem, maybe not a bug, that right-click context menu in Explorer when holding Shift, it just can't pop-up, without pressing the Ingore key and release it as soon as menu pop.
Should I make a new topic?


No, there is simply no way for S+ to know your intent and allow modifiers to work. The only way to handle this scenario is to have Shift be your Ignore key in Preferences.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/04/2015 :  22:07:16  Show Profile  Visit Rob's Homepage
Or make a gesture which sends the Shift+Right click like below:
acDisableCapture()
acDelay(100)
acSendShiftDown()
acDelay(20)
acMouseClick(gsx, gsy, 0, 1, 1) --click the right mouse button at the starting location of the gesture
acDelay(20)
acSendShiftUp()
acEnableCapture()
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/04/2015 :  22:14:13  Show Profile  Visit Rob's Homepage
I am not sure about the "static variable" problem

For example, when you first started testing patterns to make it work, imagine you used the wrong regex pattern, so you changed it. Prior to 2.8.6.0, S+ ignored ANY updated pattern you put into the field, even though it showed it correctly when you opened the S+ window again. This is because it was defined as a static variable, which means the first time the pattern was created, it could not be changed in memory. Only closing and reopening S+ would allow S+ to use the new pattern, which then would be permanent until you restarted S+ again.

So maybe your first pattern wasn't right, but then no matter what you put in, nothing would work because it was always using the very first pattern. You probably wouldn't have thought to exit and restart S+, because it doesn't seem to be a problem since it was showing correctly in the S+ window.
Go to Top of Page

robertlzj

4 Posts

Posted - 09/04/2015 :  22:19:38  Show Profile
Eh...Then Shift can't be used as modify keys?

Could it help if there is a global "Modifier Check" option. Such as "After Stroke Button Down", then StrokePlus won't capture the any keys before Stroke Button Down?
Or options to let all the modifier keys pass, that won't block any key, which might be harmless.


Thanks the explaination of "static variable", which is a run time constant I think.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/04/2015 :  22:23:59  Show Profile  Visit Rob's Homepage
Right, then Shift couldn't be used as a modifier.

Actually, for me the above script works if you make an action with a Shift modifier (no gesture/drawing), using After Stroke Button Down. So you click and hold right-mouse, then press Shift, then release right-mouse. Seems to work, as long as you don't press Shift before the right-mouse, of course.

Yes, a run time constant is exactly right..I felt I wasn't using the right term since variable means...well variable
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/04/2015 :  22:26:43  Show Profile  Visit Rob's Homepage
It was:

static boost::regex e(v3.second.get("parentclassregex",_T("")).c_str());

Is now:

boost::regex e(v3.second.get("parentclassregex",_T("")).c_str());
Go to Top of Page

robertlzj

4 Posts

Posted - 09/04/2015 :  22:45:13  Show Profile
I see, thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000