Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
/ XYAHKLiveFilter Public archive

[!!DEPRECATED!!] A livefilter addon for XYplorer

Notifications You must be signed in to change notification settings

bdeshi/XYAHKLiveFilter

Repository files navigation

XYAHKLiveFilter

forum|code | releases|bugreport

A live-filter plugin for XYplorer, made with AutoHotkey
Live-filters the file list as you type into a textbox. Uses SC filter, so all VF syntax is available.

###INSTALL:

  • Download the release archive.
  • Extract the downloaded archive into <xyscripts> (or wherever you want).
  • Next attach the following xyscript to a CTB or to a UDC Run Script item or to the Catalog.
    (it simply runs XYAHKLiveFilter.xys)
::load "<xyscripts>\xyahklivefilter.xys";
  • That's it! Now just click the CTB or trigger the UDC and filter away!
  • You can obviously also run the XYAHKLiveFilter.xys script itself directly to do the same.
  • (Remember to modify the path in the scripts to match the actual path of the exe and xys in your setup.)
  • Don't forget to read about usage & options below.
  • XYAHKLiveFilter.ctb.txt provides slightly better CTB integration.
    Execute this script to add a CTB with that snippet: ::snippet readfile("<xyscripts>\XYAHKLiveFilter.ctb.txt"); The CTB right-click menu has an option to "reset" that may help if XYAHKLiveFilter doesn't open.

###USAGE:

  • By default, the filterbox pops up and stays over the right edge of the AB (addressbar), enabling AB if needed.
    See $SyncToAB in OPTIONS below for more details.
  • If associated with a CTB, that CTB toggles the filterbox, and any other calling method refocuses it.
    See $NextAction in OPTIONS and in XYAHKLiveFilter.xys for more details.
  • Press the focus hotkey (default:CTRL+`) to focus the filterbox and TAB to refocus main XY window. (of course mouse can be used instead too.)
    See $FocusHotkey in OPTIONS and in XYAHKLiveFilter.xys for more details.
  • Press ESCAPE while the filterbox is focused to close it. (also quits automatically when parent XY window is closed.)
  • You might get pattern errors while entering complex/RegExp patterns. In that case, check the P checkbox to pause livemode, type the pattern, then uncheck it again to submit the pattern.
  • Livemode can also be toggled with ALT+P. Press ENTER to force filter update while paused.
  • If you use the script as a UDC with a keyboard shortcut, it's best to associate the same shortcut as $FocusHotkey.
  • The filterbox uses the same font and fontsize as the addressbar, so you can be sure it'll always match the zoom level of XY.

###OPTIONS: These options may be modified in XYAHKLiveFilter.xys.

  • $FocusHotkey: this value is passed as the shortcut code to instantly focus the filterbox. The default value ^` means CTRL+`. It follows Authotkey's hotkey definition syntax.
  • $SyncToAB: if set to 1, the filterbox is positioned over right edge the of the addressbar. This is enabled by default. This also forces the AB to stay visible as long as livefilter is running (reverts back to last state when the filter is closed).
    If $SyncToAB is not 1, then the filterbox is pops up and stays at the topright of XY, and does not try to modify AB visibility.
  • $ABPadding: Adjust this value only if the filterbox doesn't horizontal-align exactly with the addressbar.
    The value should be a (small) integer: 0,3,-2 etc (default is 5).
    The filterbox moves up/down this many pixels. Only effective when $SyncToAB = 1.
  • $Quote: Controls how the VF pattern is quoted. Use S for single quotes (default) or D for double quotes.
    Any quotes inside the pattern are taken care of - you don't have to type two quotes when you want one. The only advantage is that XY variables in pattern are resolved when $Quote = "D"
  • $NextAction: Controls what subsequent calls to start XYAHKLiveFilter do, after it's been already opened. Values: 1: focus, 2: quit.
    Now you can, for example, click the CTB once to open the filterbox, and click it again to focus.
  • $NextActionCTB: Same as $NextAction, but controls what happens when run with a CTB.

Each of these variables may be set as empty, eg, $FocusHotkey = "";

###IMPORTANT:

  • To work correctly, the exe/ahk must be launched using the XYscript.
  • If the filterbox doesn't open, unset the permanent variables $p_XYAHKLiveFilter_A,$p_XYAHKLiveFilter_B and try again.
    (CTB integration provides an easy RESET option on right click.)
  • May also fail to run if an invalid hotkey string is supplied in $FocusHotkey.
  • Some anti-malware suites apparently flag compiled ahk scripts as infected, which is a false alarm. If in doubt, you can always generate the exe yourself or directly run it as an ahk script.

Well, that's about it. Happy filtering!