Filter to show videos & folders
Moderators: fgagnon, nikos, Site Mods
Filter to show videos & folders
I am trying to create a visual filter to only show videos AND folders.
Can anyone point me in the right direction?
Cheers
Can anyone point me in the right direction?
Cheers
you can use OR rules for that, so make a rule on NAME and a rule on ATTRIBUTES, the name would contain all video extensions like *.wmv, *.avi etc (separated by commas) and the attributes rule would include D for directory. Make them both (boolean) OR and it should work
an easier way could be to use the folder tree for folders and the contents pane (right) for videos
an easier way could be to use the folder tree for folders and the contents pane (right) for videos
there is no clean way to add this but some of the script guys can help you. The idea is that you must save this filter with a name and then type its name as a quicksearch filter in the addressbar:
(note leading colon : and curly braces)
then pressing shift+enter will apply this hyperfilter.
Code: Select all
: {dirsAndVideo}
then pressing shift+enter will apply this hyperfilter.
If you download this (as ever, source code included for the security conscious) and create a User Command like this:
> x2Filter.exe "FilterName"
...you may then put that user command in a toolbar or attach a shortcut key to it. Note that "FilterName" should be whatever the name you saved your filter to, and that the x2 AddressBar (View -> Toolbars -> Address bar) must be visible.
Caveat: For some reason (unrelated to this script) my machine isn't very happy using the :{nnn} method nikos explained above - I'm attempting to find the source of this, but it's eluding me. So until we get to the bottom of that, it's a little difficult for me to ensure this script works perfectly - please report any weirdness. We soldier on, inevitably.
> x2Filter.exe "FilterName"
...you may then put that user command in a toolbar or attach a shortcut key to it. Note that "FilterName" should be whatever the name you saved your filter to, and that the x2 AddressBar (View -> Toolbars -> Address bar) must be visible.
Caveat: For some reason (unrelated to this script) my machine isn't very happy using the :{nnn} method nikos explained above - I'm attempting to find the source of this, but it's eluding me. So until we get to the bottom of that, it's a little difficult for me to ensure this script works perfectly - please report any weirdness. We soldier on, inevitably.
OK,
I'm using the script you were very kind enough to write, and have set up a user command to activate the filter. It works. The first time. After turning the filter off, and back on again x2 crashes .
When it comes back up the user command works for the 1st time and then crashes the 2nd time.
Not sure why.
Also I have put the x2Filter.exe in the x2 program files folder just for neatness.
I'm using the script you were very kind enough to write, and have set up a user command to activate the filter. It works. The first time. After turning the filter off, and back on again x2 crashes .
When it comes back up the user command works for the 1st time and then crashes the 2nd time.
Not sure why.
Also I have put the x2Filter.exe in the x2 program files folder just for neatness.
- the mechanic
- Member
- Posts: 36
- Joined: 2005 Mar 30, 18:48
- Location: MN
OK, I copied the X2Filter.exe to the program directory. Then, as instructed I created a user commandKilmatead wrote:If you download this (as ever, source code included for the security conscious) and create a User Command like this:
> x2Filter.exe "FilterName"
...you may then put that user command in a toolbar or attach a shortcut key to it. Note that "FilterName" should be whatever the name you saved your filter to, and that the x2 AddressBar (View -> Toolbars -> Address bar) must be visible.
Caveat: For some reason (unrelated to this script) my machine isn't very happy using the :{nnn} method nikos explained above - I'm attempting to find the source of this, but it's eluding me. So until we get to the bottom of that, it's a little difficult for me to ensure this script works perfectly - please report any weirdness. We soldier on, inevitably.
> x2Filter.exe "FilterName"
When I execute the command in the address bar it replaces the command with
:{within one month}
then I have to hit enter to get it to filter. Seems reasonable I guess.
When I create a user command I put in the same stuff and when I select it, it places
:{within one month}
in the toolbar again and I have to hit Enter? What do I need to do to get the command just to set the filter?
Secondly, why is it if I create a user filter in pane one and go over to pane two it does not appear? Don't tell me I have to create each and every filter twice, once for each pane???
mechanic
If you run x2filter from a user-command, it will hit <Enter> for you, so you should only need to click the button to apply. Unfortunately this kind of filter button can't be used to "toggle" - you still need to use <Ctrl+J> to disable the filter, or select another. (As described above, there used to be a bug in x2 related to repeatedly applying filters this way - I don't know if Nikos fixed that in the most recent Pro version or not - it is fixed in the most recent Ultimate version. That might be the source of your difficulty.)
Applying a Filter only sets it to the active pane - to apply it to both you either need to hit <Ctrl+Alt+M> or hit <Tab> to change the pane, and apply the filter again.
The script above could be easily modified to send the <Ctrl+Alt+M> command automatically, perhaps conditionally on the <Alt> key being held down when the button is clicked, as that's the usual convention for applying things to the alternate pane.
I'd suggest first we verify if this bug was actually fixed in the current Pro version or not - Nikos?
Applying a Filter only sets it to the active pane - to apply it to both you either need to hit <Ctrl+Alt+M> or hit <Tab> to change the pane, and apply the filter again.
The script above could be easily modified to send the <Ctrl+Alt+M> command automatically, perhaps conditionally on the <Alt> key being held down when the button is clicked, as that's the usual convention for applying things to the alternate pane.
I'd suggest first we verify if this bug was actually fixed in the current Pro version or not - Nikos?
- the mechanic
- Member
- Posts: 36
- Joined: 2005 Mar 30, 18:48
- Location: MN
Hmm... odd that it doesn't work for you - please try this version to see if it works a little better (the <Shift><Enter> is sent as a separate means). I also added (as a test, mainly) the application of the filter to both panes when the <Alt> key is held down when clicking the button (though this has the wacky side-effect of clearing the status-bar, so ignore that bit). Please report any weirdness. Or, indeed, successes.