XYAHKLiveFilter - livefilter the filelist
Re: XYAHKLiveFilter - livefilter the filelist
I'd like to be able to dismiss an open filter box simply by clicking on the CTB again. That eliminates having to mouse to the box and press Escape. Presently, re-clicking the CTB opens a second filter box in an odd place.
I'd also prefer not having to type in between the two quotes, which are kind of strange for a search box.
I'd also prefer not having to type in between the two quotes, which are kind of strange for a search box.
Re: XYAHKLiveFilter - livefilter the filelist
Noted. I am currently working on auto-filling with the current VF and integrating GVF, poking around in the code regions relevant to your suggestion.Papoulka wrote:I'd also prefer not having to type in between the two quotes, which are kind of strange for a search box.

Yes, this has a +1 from myself too! I'm working on it.Papoulka wrote:I'd like to be able to dismiss an open filter box simply by clicking on the CTB again. That eliminates having to mouse to the box and press Escape.
Odd. This shouldn't happen. Are you using the latest version? Also what's the CTB script you're using? (right-click the clear button in CTB editor > copy as snippet)Papoulka wrote:Presently, re-clicking the CTB opens a second filter box in an odd place.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
I'm trying to get a second click to actually FOCUS the filterbox if it's already opened. Would like this instead?Papoulka wrote:I'd like to be able to dismiss an open filter box simply by clicking on the CTB again.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
I'm using v4.2.0, on today's XY 16.30.0001. Windows 7 32-bit.
Setup was a little confusing and I might have it wrong. At this point I have simply copied XYAHKLiveFilter.exe and XYAHKLiveFilter.xys into the XY Scripts folder, and created the CBT button.
The CTB snippet is:
On LC, the filter box opens and works perfectly - this script is a keeper. On RC I get the script choices of "reset / edit". Multiple LCs just open more filter boxes, all over the place.
Setup was a little confusing and I might have it wrong. At this point I have simply copied XYAHKLiveFilter.exe and XYAHKLiveFilter.xys into the XY Scripts folder, and created the CBT button.
The CTB snippet is:
Code: Select all
Snip: CTB 1
XYplorer 16.30.0001, 2/24/2016 10:25:53 AM
Action
NewUserButton
Name
LC: open XYAHKLiveFilter
------------------------
RC: 'Reset' XYAHKLiveFilter
(if it doesn't open)
Icon
C:\XYplorer_p\Data\Icons\XYAHKLiveFilter.ico
ScriptL
perm $p_XYAHKLiveFilter_A, $p_XYAHKLiveFilter_B;
if ($p_XYAHKLiveFilter_A != 1)||($p_XYAHKLiveFilter_B != <hwnd>){
$p_XYAHKLiveFilter_A = 1; $p_XYAHKLiveFilter_B = <hwnd>;
$FocusHotkey = "^`" ; //ex: ^`=CTRL+`, !+'=ALT+SHIFT+', !Space=ALT+SPACE
$SyncToAB = 1 ; //sync filterbox position with AB
$ABPadding = 5 ; //not effective if not $SyncToAB = 1
run trim(<<<#RuncmD
"<xyscripts>\XYAHKLiveFilter.exe" <hwnd> "$FocusHotkey" "$ABPadding" "$SyncToAB"#RuncmD, " ", L),, 0;
ScriptR
"reset"
filter;unset $p_XYAHKLiveFilter_A,$p_XYAHKLiveFilter_B;ctbstate(0);
"edit"
open "<xyscripts>\XYAHKLiveFilter.xys";
FireClick
0
Re: XYAHKLiveFilter - livefilter the filelist
Well, my CBT is right near the filterbox anyway, so clicking on one is no easier or harder than the other. The tiny inconvenience is having to do that AND then press Escape. That's what I wanted to avoid. No big deal. Thanks for the script - this would be a perfect native feature of XY.SammaySarkar wrote:I'm trying to get a second click to actually FOCUS the filterbox if it's already opened. Would like this instead?Papoulka wrote:I'd like to be able to dismiss an open filter box simply by clicking on the CTB again.
Re: XYAHKLiveFilter - livefilter the filelist
Right. Sorry about that. I should update readme.md.The CTB snippet is: [...]
On LC, the filter box opens and works perfectly - this script is a keeper. On RC I get the script choices of "reset / edit". Multiple LCs just open more filter boxes, all over the place.
Clear and remove that CTB, and use the snippet given in ctb.md
Code: Select all
Snip: CTB 1
XYplorer 15.90.0013, 11/8/2015 10:56:37 AM
Action
NewUserButton
Name
LC: open XYAHKLiveFilter
------------------------
RC: 'Reset' XYAHKLiveFilter
(if it doesn't open)
Icon
ScriptL
$FocusHotkey = "^`" ;/*Ensure this matches associated shortcut!*/ if isset($p_XYAHKLiveFilter_A){sendkeys $FocusHotkey;} else {load "<xyscripts>\XYAHKLiveFilter.CTB.xys";}
ScriptR
"reset"
filter;unset $p_XYAHKLiveFilter_A,$p_XYAHKLiveFilter_B;ctbstate(0);
"edit"
openwith "notepad",, "<xyscripts>\XYAHKLiveFilter.xys";
FireClick
0
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
This is actually far easier than what I'm currently trying to do (many issues: ctb clicks only focus some of the time, or the editbox's caret doesn't go away etc).Papoulka wrote:Well, my CBT is right near the filterbox anyway, so clicking on one is no easier or harder than the other. The tiny inconvenience is having to do that AND then press Escape. That's what I wanted to avoid. No big deal. Thanks for the script - this would be a perfect native feature of XY.SammaySarkar wrote:I'm trying to get a second click to actually FOCUS the filterbox if it's already opened. Would like this instead?Papoulka wrote:I'd like to be able to dismiss an open filter box simply by clicking on the CTB again.
OK this matches XY's regular button action behavior. I'll add this feature.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
FYI, experimenting with searching for various files... many of mine have a semicolon in their names. Without consulting VF rules I just started typing
- ";
Re: XYAHKLiveFilter - livefilter the filelist
Nope, I just get a XY scripting error. You can close that and continue typing (correctly!). Its not just hard to fix, its impossible to fix. You, as a user, have to ensure your filter pattern is syntactically correct.Papoulka wrote:I just started typingwithin the existing quotes, at which point the livefilter script crashed. This may be harder to fix than it's worth; just noting it here.Code: Select all
";

Did my snippet above fix your other problem: "Multiple LCs just open more filter boxes, all over the place." ?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
Yes; now a second LC does nothing.
Re: XYAHKLiveFilter - livefilter the filelist
Great, thanks for the feeback. I'll make an interim 4.2.1 maintenance release to publish the updated procedure.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
v5.0.0b
So much under the hood improvements, that your subconscious will throw a party!
So much under the hood improvements, that your subconscious will throw a party!


- New features
- Simplified install. Just extract+overwrite, and use ::load "xyahklivefilter.xys"; to call everywhere: no separate scripts for CTB.
(For best results, recommend a clean install. Delete all older XYAHKLiveFilter files, CTBs and other calling scripts.) - Reuses existing visual filter.
- Removed default quotes from filterbox.
- Choice of enclosing the pattern in single or double quotes. The pattern is escaped, so you don't have to type two quotes.
- Added customizable 2nd-click action, separately customizable for CTB.
So, you can run the filter using any method, and another click will focus or close it, depending on your setup. - (hopefully) better documentation.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: XYAHKLiveFilter - livefilter the filelist
Now it looks and acts like a native function - very slick. Thanks.
-
- Posts: 4376
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 24H2 Build 26100.4770 at 100% 2560x1440
Re: XYAHKLiveFilter - livefilter the filelist
Very nice Sammay. I finally got a chance to run your latest version. Works great!
Maybe this is covered in an option in the XYS file, but I didn't see it. Believe it or not, I'm one who doesn't always have the AB on, so I when I run the script from a CTB, the AB pops up along with XYAHKLiveFilter which is exactly what I want, but it would be nice if the script knew when the AB was not on when it was initially run, so when you hit escape to close XYAHKLiveFilter, the AB would also be closed (or possibly an option). Right now for me anyway, when ESC is hit the XYAHKLiveFilter box goes away, but the AB is left remaining. Any chance that could be worked in or maybe it already exists? Thanks.

Maybe this is covered in an option in the XYS file, but I didn't see it. Believe it or not, I'm one who doesn't always have the AB on, so I when I run the script from a CTB, the AB pops up along with XYAHKLiveFilter which is exactly what I want, but it would be nice if the script knew when the AB was not on when it was initially run, so when you hit escape to close XYAHKLiveFilter, the AB would also be closed (or possibly an option). Right now for me anyway, when ESC is hit the XYAHKLiveFilter box goes away, but the AB is left remaining. Any chance that could be worked in or maybe it already exists? Thanks.
Re: XYAHKLiveFilter - livefilter the filelist
hmm, hmm, it is supposed to auto-close the AB.
Will release a fix.

Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]