topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:07 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

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

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
FARR helper script: Tab to toggle folders only search on/off
« on: November 19, 2018, 05:30 AM »
AutoHotkey script to make Tab button toggle folders search on/off in FARR by adding/removing +\ to the searchbox.

Code: Autohotkey [Select]
  1.  
  2. ;FARR helper script
  3. ;by nod5 181119
  4. ;Press Tab to toggle search only folders
  5. ;Note: Overrides FARR default Tab autocomplete hotkey
  6.  
  7. #IfWinActive, ahk_exe FindAndRunRobot.exe
  8. Tab::
  9. ControlGetText, farr, TEdit1, ahk_exe FindAndRunRobot.exe
  10. farr := InStr(farr, "+\") ? StrReplace(farr, "+\", "") : farr " +\"
  11. ControlSetText, Tedit1, % farr, ahk_exe FindAndRunRobot.exe
  12. return

Background
FARR's default Tab shortcut autocompletes the selected results full path into the search box.
https://www.donation...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,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: FARR helper script: Tab to toggle folders only search on/off
« Reply #1 on: November 19, 2018, 06:30 AM »
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: