DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: FARR helper script: Tab to toggle folders only search on/off  (Read 5,158 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,175
    • Coding Snacks
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
FARR helper script: Tab to toggle folders only search on/off
« on: November 19, 2018, 11:30 AM »
AutoHotkey script to make Tab button toggle folders search on/off in FARR by adding/removing +\ to the searchbox.

Code: ( autohotkey)
#NoEnv
#SingleInstance force

;FARR helper script
;by nod5 181119
;Press Tab to toggle search only folders
;Note: Overrides FARR default Tab autocomplete hotkey

#IfWinActive, ahk_exe FindAndRunRobot.exe
Tab::
ControlGetText, farr, TEdit1, ahk_exe FindAndRunRobot.exe
farr := InStr(farr, "+\") ? StrReplace(farr, "+\", "") : farr " +\"
ControlSetText, Tedit1, % farr, ahk_exe FindAndRunRobot.exe
return
#IfWinActive

Background
FARR's default Tab shortcut autocompletes the selected results full path into the search box.
https://www.donationcoder.com/Software/Mouser/findrun/help/hotkey_and_shortcut_summary.htm

I never have use for that but often want to temporarily limit searches to folders only and pressing Tab (with this script running) is quicker than typing or removing +\ in the searchbox.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: FARR helper script: Tab to toggle folders only search on/off
« Reply #1 on: November 19, 2018, 12:30 PM »
Very nice! I didn't know it would be possible to intercept and modify the text in an input box in that fashion.  Very neat.  :up:

Original address: https://www.donationcoder.com/forum/index.php?topic=46684.0