avatar image

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

Login with username, password and session length
  • Thursday June 8, 2023, 1:02 pm
  • 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Nod5 [ switch to compact view ]

Pages: [1] 2 3 4 5next
DC Website Help and Extras / cert warning dcmembers
« on: December 07, 2022, 01:45 AM »
I noticed a cert warning when accessing the dcmembers site in Chrome now. Expired 1 december.

Find And Run Robot / appcap and appcapresults not working for .ahk files
« on: September 12, 2022, 06:11 AM »
appcap and appcapresults do not work for AutoHotkey .ahk files, but they work if we compile the same script to .exe

To reproduce this issue:
1. Save this script as C:\folder\a.ahk
Code: Text [Select]
  1. FileAppend, C:\Windows\System32\mspaint.exe, * ;StdOut
2. right click .ahk and compile, to get a.exe
2. Create new FARR alias
alias name: appcaptest
alias results:
Code: Text [Select]
  1. .ahk test | appcapresults C:\folder\a.ahk
  2. .exe test | appcapresults C:\folder\a.exe
3. try both alias results

Expected effect: both alias results should transform the result list to a link to Paint
Actual effect: ".ahk test" does nothing

This issue has existed for a long time (maybe since appcap was first introduced?) but would be nice to see it fixed (if possible and easy) or to see if anyone knows a workaround on the AutoHotkey side, without compiling the script that is. Mouser, does appcap try to use any file passed to it (and the issue is rather something in Windows) or is there a whitelist in FARR based on extensions or something else?

N.A.N.Y. 2021 / NANY 2021: MoveFileHere
« on: December 30, 2020, 10:09 AM »
Application Name MoveFileHere
Version 2022-01-09
Short Description AutoHotkey tool to quickly move newest file from Downloads to the active File Explorer folder in Windows 10.
Supported OSes Windows 10
Web Page
Download Link Standalone EXE file
AHK source file


A very small hotkey tool that I use all the time, now released for NANY in case other people also often move files soon after downloading them and find the sequence Right click, Click "Show in folder", Ctrl+X, Alt+Tab Tab Tab, Ctrl+V way too long :). With MoveFileHere you press F7 to move the latest downloaded file to the active Explorer folder. The hotkey and folder can be changed in settings. Copy and rename MoveFileHere.exe to e.g. MoveFileHere2.exe to set up multiple hotkeys and folders.
See GitHub README for more details.

Note: antivirus tools may incorrectly flag the AutoHotkey compiled .exe file. You can always install AutoHotkey and then compile MoveFileHere yourself from the .ahk source file or simply run the .ahk source directly.

MoveFileHere helps a workflow where we make the browser always download to a fixed Downloads folder and then quickly move the file elsewhere afterwards. Compare that to the workflow of quickly picking a custom download/save folder for each download using Listary or the small SaveAsPathHelper script I quickly made to mimic some Listary features.

After pressing F7 the user accepts the move with Enter, Space or Left Click. To instead cancel the move press Esc, F7 again or wait 2 seconds.

This may have been solved before but I didn't find it with search just now.

In FARR settings the search folders page has a field for restricting what to search in the folder.
How do we restrict the search to not show any folders? That is, the search results should show files in the specified folder and in its subfolders, but should not show the subfolders themselves.


We can include file extensions with "txt;pdf;md" and exclude file extensions with "-mp4;mkv;avi".

But the on screen help text says nothing about folders. Nor does the help page https://www.donation...lp/searchfolders.htm Is there a syntax for that field to exclude folders? ( 2009 thread requested such syntax. )

I tried "-\" and "-\\" but neither worked.

If the search folder modifier keyword is used in an alias together with dosearch then one workaround is to add "-\" in the alias result line (or manually in the searchbox) to exclude folders. Or alternatively "+." to only include files. Helpfile page on that.

That workaround excludes folders, with one exception it seems: the base folder for the search folder settings is still included. For example in the screenshot above the base folder would be "C:\FARR\farr-tldr". But I noticed that if we in the alias instead add "-\\" (two slashes instead of one) then the base folder is also excluded. Though that seems undocumented behaviour.

Find And Run Robot / FARR mini weather report from
« on: November 19, 2020, 11:55 AM »
Wttr is a fun and fast URL based command line weather report tool.
Background and syntax here

This post describes how to show wttr weather as text directly in the FARR searchbox.


Step 1. create a FARR alias
name: weather
regex: ^(weath|weat|wea)$
result: weather | appcap "C:\folder\FARR_weather_helper.exe"

Step 2. prepare helper AutoHotkey script
- Save code to C:\folder\FARR_weather_helper.ahk
- Modify the wttr URL in the code: which location? what data to show? language? extra text?
- Compile the script to an .exe file (necessary since FARR's appcap doesn't work if we run .ahk scripts uncompiled, it seems)
Code: Autohotkey [Select]
  2. ; FARR_weather_helper.ahk
  3. ; 2020-11-19 by Nod5
  4. ; helper script to show weather from in FARR searchbox
  5. ; wttr details and syntax at
  7. ; prepare wttr URL (must escape each % character with `)
  8. vUrl := "`%c+`%t+`%C"
  9. ; example output: ☀️ +9°C Sunny
  11. ; download weather page to variable
  12. vString := urlDownloadToVar(vUrl)
  14. ; replace FARR searchbox string with weather string via clipboard paste
  15. ; clipboard pastes all at once so won't trigger other aliases
  16. vBackup := ClipboardAll
  17. Clipboard := vString
  18. Send ^a^v
  19. sleep 500
  20. Clipboard := vBackup
  21. vBackup := ""
  24. ; function: dowload URL and return it as variable
  25. UrlDownloadToVar(url, raw :=0)
  26. {
  27.   ; prefix https:// if not found
  28.   if( !regExMatch(url,"i)https?://") )
  29.     url := "https://" url
  30.   try
  31.   {
  32.     hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
  33.     hObject.Open("GET",url)
  34.     hObject.Send()
  35.     return raw ? hObject.ResponseBody : hObject.ResponseText
  36.   }catch err{
  37.       MsgBox % err.message
  38.   }
  39.   return 0
  40. }

Here are some alternative ways to use wttr in FARR
  • Load the wttr URL as embedded webpage in FARR
  • Run a script to get the URL weather text and show as a FARR results line via appcapresults
  • Run a script to get the URL weather text and show it in FARR searchbox via FARR's command line parameter -search
But in all these three cases FARR does not show the unicode weather emoji correctly.
However wttr also has options for richer output formats such as multiline or even mapped weather reports as .png images, and that could probably look quite nice in FARR's HTML view.

This post is to test if we can embed a short MP4 animation inline in DC forum posts. Here goes:


We can attach the .mp4 to the bottom of the post, but it then downloads rather than shows in the browser.

Attempts at embedding that did not work with an .mp4 file attachment

Also not working: embed animation from imgur server


The FARR command dosearch lets an alias perform a new search and display the results. We can use search folder modifier keys and trigger long search patterns from a short alias. Great! But dosearch has no options to adjust the results line for each search match.

This request is an enhanced dosearch command, call it dosearchformatresults, that lets us format the search result lines.

One idea for the syntax is to put result formatting at the end after a frontslash and keyword, like for the FARR window options and /icon=... instructions. Like this
dosearchformatresults <regular dosearch syntax here> /result=<result formatting here>

The result formatting part would have the syntax we can use for results in aliases plus special variables related to each search match file. Example:
%filename% | showfilehtml %filepath%
In this example FARR would perform a dosearch for .html files and then for each match show a result line that when triggered shows the .html files inside FARR, rather than open it in the default .html application (external browser).

Probably some more complex escaping of characters and other ways to avoid weird conflicts/loops would be needed (recursive dosearchformatresults might cause weird issues for example  :D).

We can already achieve something like what I'm requesting via external scripts and appcapresults. But that is complex and FARR could probably do it quicker. The external workflow steps goes like this:
- FARR alias that passes a regex match from the typed string in FARR to an external script via dolaunch and appcapresult
dolaunch appcapresult C:\externalscript.exe $$2
- external script that searches some folder for e.g. .html files with filenames that match the passed string(s)
- for each match prepare a result line with the showfilehtml command
- result lines are passed back to FARR via stdout when the script exits
- FARR's appcapresult reads the results and displays them
- the user selects a result and presses Enter to view the HTML page inside FARR
In this external workflow FARR starts an external process and waits for it to finish for each typed character, which I've seen can cause some slowdowns.

This animation illustrates how it looks.

The .html files in the illustration are derived from the TLDR project - a neat collection of short usage examples for CLI commands in Linux/Windows -  that I've converted from Markdown (previous post related to that).

Background: I'm using FARR to show HTML files generated by Pandoc from Markdown source files with CSS similar to that of GitHub.

I ran into some CSS issues which got me searching for details on the browser engine/mode used by FARR. The forum posts I find on that are quite old and I'm not sure if they reflect the current state of FARR. Thus questions:

1. What browser engine/mode (not sure what the correct term is here) does FARR by default use on a fresh install of Windows 10 with latest updates? Edit: answered in edits below.
2. Are some FARR settings available to adjust what browser is used or some details on how it is used?

The help page https://www.donation...p/html_view_mode.htm says
Html view mode is currently rendered using the IE activex dll as an embedded web browser.  This means that it will use the version of the Internet Explorer engine installed on the user's pc, and can support displaying anything that can be displayed in a normal browser.
It is not so clear if that means IE11.

One of my CSS issues was that FARR did not show the background color of inline code blocks in the HTML I tested with.

How it looks in Firefox/Chrome/Edge
firefox chrome edge.png

How it looks in FARR

I tracked this down to the CSS using the color function RGBA which IE seems to not support
edit: My mistake. The correct RBGA() compatibility page says IE9+ is supported, IE6-8 is not.

Adding this line to the HTML
<meta http-equiv="x-ua-compatible" content="IE=edge" />
makes FARR show the code element background color just like in the external browsers.
I found that on , with much more background on .

So, workaround achieved, I suppose. But I'm unsure what other changes in how FARR renders HTML that line causes. Does it make FARR use Edge? Or adjust the IE1 version/mode used? I hope for feedback from mouser or others on this topic.

edit: Answering myself. We can check browser document mode by adding this line to the HTML document, which shows a popup when FARR renders it
Findings: Before adding the "<meta ..." line my FARR used document mode IE7. After adding the line FARR uses IE11.

That explains why the CSS RGBA() function, which required IE9+, only worked after adding the line. Note also that the "IE=edge" part does not mean that the browser Edge is used, it instead means that the newest available Internet Explorer document mode will be used. Which is IE11 on a fully updated Windows 10 PC today.

To reproduce my exact steps do this:

- download from the tldr project GitHub.
- download this style.css that mimics GitHub's looks.
- download Pandoc
- run this to output the file cmd.html
pandoc -c style.css -s --self-contained -o cmd.html

- edit cmd.html and remove these lines (otherwise FARR will freeze and not show the HTML)
  <!--[if lt IE 9]>
    <script src="//"></script>

- create a FARR alias with this as result
showfilehtml C:\path\to\cmd.html

- trigger the alias and notice that the code elements lack background color
- edit cmd.html again and add this below the <head> line
<meta http-equiv="x-ua-compatible" content="IE=edge" />
- trigger the alias again - now the background color should show.

BTW I'm reworking some of my FARR stuff which explains my many recent FARR posts. Bear with me mouser :)

Minor UI request: option to hide the alias name string that in large icon mode shows under each non-filepath result.
FARR display options lets us uncheck the "Location" report column. But that hides both alias name strings and filepaths. I'd prefer to only hide the alias name strings and keep filepaths visible.


Alternatively, an option to customize what that smaller line of text contains, through commands in results lines. Perhaps something similar to the "/hint=..." syntax?

I've also noticed that if we use appcapresults to generate a list of results then in some cases FARR shows the string "alias" on this smaller line also in cases where it would have shown e.g. "showfilehtml C:\file.html" if the result was defined in the regular FARR alias settings.

In FindAndRunRobot version 2.234.01 mouser added a useful alias command called appcapresults

appcapresults runs an external program, waits for it to output to stdout and then display that output (if correctly formatted) as FARR results lines.

This post shows examples on how to use it together with AutoHotkey to generate a results list in FARR.

Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  3. ; example AutoHotkey script for use with FARR appcapresults
  5. ; prepare a results list
  6. ; each line adheres to FARR's format for lines in alias results
  7. ; note: must have a blank line at the end, otherwise the last text line won't show in FARR
  8. Results =
  9. (
  10. Notepad | C:\Windows\System32\notepad.exe
  11. Paint | C:\Windows\System32\mspaint.exe
  13. )
  14. ; use fileappend with * to write the list to stdout
  15. FileAppend, % Results , *

1. Save the above script as C:\folder\example.ahk and compile to C:\folder\example.exe

2. Next create a FARR alias
alias name: appcapresults example
alias regex: ^appcap$
alias results:
example | appcapresults C:\folder\example.exe

After that you can type "appcap" in FARR and press enter to get something like this


To make the alias trigger automatically, without Enter, you can change the alias to
example | dolaunch appcapresults C:\folder\example.exe

That's the basics. But this opens up the possibility of complex, conditional aliases. Some possibilities:
- Have the script present different results lists based on the current day/time
- Pass the %lasthwnd% parameter from FARR to the script and have script present different results depending on what window was active before FARR. For example we could make the alias "help" and have it show our own customized help hints based on what application is active. Related earlier post.
- Another example is to have the script search Everything via its SDK and display the search results in FARR, in effect creating an alternative Everything plugin for FARR. This works, though I don't have the code cleaned up enough to post it yet.


More complex example: alias results conditional on the active window

Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  3. ; complex example conditional AutoHotkey script for use with FARR appcapresults
  5. ; window id for active window as parameter sent from FARR
  6. LastHwnd := A_Args[1]
  8. ; if active window is Firefox
  9. If LastHwnd and WinExist("ahk_exe Firefox.exe ahk_id " LastHwnd)
  10. {
  11.   Results =
  12.   (LTrim
  13.   Google |
  14.   Wiki |
  16.   )
  17. }
  19. ; if active window is MS Paint
  20. If LastHwnd and WinExist("ahk_exe mspaint.exe ahk_id " LastHwnd)
  21. {
  22.   Results =
  23.   (LTrim
  24.   // use FARR sendkeys command to send action shortcuts to MS Paint
  25.   Resize | sendkeys ^w
  26.   Crop selection | sendkeys ^(+x)
  28.   )
  30. }
  32. ; use fileappend with * to write the list to stdout
  33. FileAppend, % Results , *

1. Save the above script as C:\folder\example2.ahk and compile to C:\folder\example2.exe

2. Next create/edit a FARR alias
alias name: appcapresults example2
alias regex: ^appcap$
alias results:
example | appcapresults C:\folder\example2.exe %lasthwnd%

Type "appcap" and press enter over MS Paint and Firefox to get different results



GIF of sending the action shortcuts to MS Paint from FARR

edit2: improved complex example

On one Win10 PC FARR aliases with this kind of result line
relative path | C:\a.txt /icon=wmp.ico
does not show the icon.

This happens even though the wmp.ico file exists in the same folder as the .alias file, namely

Instead FARR shows this other icon
C:\Program Files (x86)\FindAndRunRobot\Icons\console.ico


The exact same alias and icon works ok in FARR on another Win10 PC so this is something specific, though I haven't pinned down the cause yet.
edit: Happens on PC number 2 too after updating FARR on it to the latest latest beta , so perhaps this is a general issue with version 2.250?

Note that the wmp.ico is just an example. This issue happens with any icon, but the wmp.ico comes bundled with Win10 so might be useful if mouser or others want to reproduce/troubleshoot this on their PCs.

What does work:
1. Results lines with absolute paths to an icon files, like
absolute path | C:\a.txt /icon=C:\test\wmp.ico
or even
absolute path | C:\a.txt /icon=C:\Users\<username>\Documents\DonationCoder\FindAndRunRobot\AliasGroups\MyCustom\wmp.ico


2. If I copy the icon to this location
C:\Program Files (x86)\FindAndRunRobot\Icons\wmp.ico
and restart FARR then aliases with relative paths to the icon now shows the correct icon! That is this
relative path + icon in C:\Program Files (x86)\FindAndRunRobot\Icons | C:\a.txt /icon=wmp.ico
shows this

So FARR on this PC appears to looks for relative path alias icons not next to the .alias file but in C:\Program Files (x86)\FindAndRunRobot\Icons

This is a minor issue - I can just use the absolute path icons as a workaround. But it seems undocumented and I found no setting to change it so worth making a post about.

edit: Relevant FARR help file page that documents the alias icon command
/icon=localfilename_from_aliasdir.ico (icon file must be in same dir as the source xml file defining the alias)

Request: option to not show search results until the string in the search box is N or more characters long, except if the string matches an alias regex pattern.

The idea here is that typing only one or two characters is often not enough to get a good match when using FARR for general file search. Which means that FARR results will resize and flicker briefly with irrelevant results until we have typed enough characters to get something useful. That's most often visual clutter.

The regex alias exception is needed since it can be useful to have a few short regex aliases that are easy to memorize. For example "ff" for Firefox.

The option could be added on the Program Options > Settings > Search Behaviour view.

Microsoft keeps adding nice stuff to the revived PowerToys apps

Most recently PowerToys Run, a launcher app that has some similarity with FindAndRunRobot

Here are my subjective impressions after some quick tests.

1. PowerToys Run has a nice, clean interface with big fonts and no clutter. It takes inspiration from the launcher Wox.


FARR can be similarly minimally styled using the slenderFARR skin, display option "Large Icon Slides", dragging to hide the toolbar buttons, and using a script to hide the statusbar text.


2. Run has built in support for CMD/terminal commands through the > prefix.


FARR can do that too by creating an alias like this:

alias name: run terminal command
RegEx: ^>(.*)
cmd | C:\Windows\System32\cmd.exe /c $$1



3. PowerToys Run can search and switch to open windows. That's a nice to have feature!

4. PowerToys does not have aliases. FARR has very powerful aliases. That is a huge difference. Aliases make FARR searches and actions very easy to customize - it becomes a much more powerful and versatile tool. Even more so when combined with some small AutoHotkey scripts.

All in all I still prefer FARR. Not a big surprise I suppose!  ;D But its age is showing a bit.
- I wish the FARR default UI had a more flat and minimal design.
- To create/test/edit/share/backup FARR aliases is a bit clunky, which might prevent new users from making and using the more powerful aliases features.
- The FARR options give intricate control of search result scoring, which was perhaps more relevant for the era of slow hardrives than for new faster SSD storage.

AutoHotkey script template to take action on selected files in active File Explorer window in Windows 10.

FARR can find and launch files, but also do much more. This AutoHotkey script template helps you use FARR to quickly take action on selected files in the active Explorer window. Similar to a context menu action in Explorer, but started from a FARR alias.

AutoHotkey script template
Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  3. ; Template: take action on selected files in active Explorer window
  4. ; - AutoHotkey helper script template for FindAndRunRobot (FARR)
  5. ; - by Nod5 2020-04-25
  7. ; Get active the window's handle (Hwnd) from parameter passed by FARR
  8. vHwnd := A_Args[1]
  10. ; verify that the window is Explorer
  11. WinActivate, ahk_id %vHwnd%
  12. If !WinActive("ahk_class CabinetWClass ahk_id " vHwnd)
  14. ; get filepaths for selected files
  15. aFiles := ExplorerHwndSelectedFilepaths(vHwnd)
  17. ; ----------------------------------------------------
  18. ; add code to take action on the files here
  20. ; example: show each filename in a messagebox popup
  21. For Key, vFile in aFiles
  22. {
  23.   SplitPath, vFile, vFilename
  24.   MsgBox % vFilename
  25. }
  27. ; ----------------------------------------------------
  29. ; exit script when finished
  32. ; required function
  33. ; function: ExplorerHwndSelectedFilepaths()
  34. ; return array of filepaths for selected files in Explorer window identified via HWND
  35. ExplorerHwndSelectedFilepaths(vHwnd)
  36. {
  37.   if !vHwnd or !WinExist("ahk_class CabinetWClass ahk_exe Explorer.exe ahk_id " vHwnd)
  38.     return
  39.   for window in ComObjCreate("Shell.Application").Windows
  40.   {
  41.     if (window.HWND != vHwnd)
  42.       continue
  43.     aFiles := []
  44.     sfv   := window.Document
  45.     ; note: gets items in alphanum ascending sort order
  46.     ;
  47.     items := sfv.SelectedItems
  48.     for item in items
  49.       aFiles.push(item.Path)
  50.     break
  51.   }
  52.   window := item := items := sfv := ""
  53.   return aFiles
  54. }

Install AutoHotkey,

Create a new action
- Download the template to a file, for example "C:\some folder\timestamp action.ahk"
- Edit the template to add code for the action you want to perform on the selected files
- Create a FARR user alias to launch the script and pass the parameter %LASTHWND%

Example FARR alias
- alias keyword: timestamp now
- regular expression pattern: ^(stamp)$
- result: C:\some folder\timestamp action.ahk %LASTHWND%

Use the action
- Open Explorer and select some files
- Open FARR, type to show the alias action (for example "stamp") and press Enter.

The regular expression pattern is optional in FARR aliases, but useful to more quickly get to a single result.
For max speed use short patterns like ^(sta|stam|stamp)$ to show only the alias result when you type "sta", "stam" or "stamp" but still let FARR show regular file search results if you continue typing for example "stamp collection".

Action example
Code: Autohotkey [Select]
  1. ; set "time modified" for the file to the current time
  2. For Key, vFile in aFiles
  3. {
  4.   FileSetTime, % A_Now, % vFile, M
  5. }

List of action ideas
- add to music/video app playlist
- copy to some other folder
- create file shortcuts in some other folder
- create a companion note file ("filename.jpg -- notes.txt")
- compare selected files in WinMerge
- scale image files 50%
- rotate image files 90 degrees
- change file date modified/created timestamp to current time
- create backup file copy with a timestamp suffix ("filename_20200423103546.txt")
(Useful for basic versioning when Git is overkill but you want some order to avoid a mess like "text.doc", "text2 final.doc", "text 2 final FIXED.doc")
- calculate and save file hashes (sha1, sha256, ...)

Ideas for more advanced actions
Asymmetric action on two selected files: copy/clone some feature (image size, timestamp, filename pattern, ...) from first file onto second file. For example clone a date modified timestamp.

Why use this rather than regular Explorer context menu actions?
- easy to create and use if you're already using FARR and AutoHotkey
- very quick if you set up short regex alias patterns
- quick to toggle aliases on/off
- you can add and show context/instructions to alias text to remind you what the action does
- avoid browsing a cluttered context menu

Example with screenshots
Use case: We want a quick way to to create .txt files to write notes about some files, for example some images.


Edit the template and add an action to create .txt note files. Save, for example to "C:\test\create txt note.ahk"

Code: Autohotkey [Select]
  1. ; create companion text file for notes
  2. For Key, vFile in aFiles
  3. {
  4.   FileAppend, , % vFile " -- notes.txt"
  5. }

Create a user alias in FARR


Select files in Explorer, Open FARR and use the alias


Text files are created.


Take important notes.


I noticed that if I open an incognito tab in Chrome or Firefox and load then the main page loads as http (not https). While loaded as http Chrome labels the connection "Not secure" and some of the top menu bar icons are not visible. Once any link on the page is pressed the https version is loaded.

Find And Run Robot / minor bug: FARR locks #filecontents file if empty
« on: February 17, 2020, 03:57 AM »
Minor bug: If an alias uses #filecontents and the file exists and is empty then FARR locks that file.

To reproduce:
1. Make an alias with this as Results
#filecontents C:\test.txt
2. Create the empty file "C:\test.txt"
3. Run the alias
4. close FARR
5. try to delete or write to "C:\test.txt"

This might also affect the fileresults command, I haven't had time to test that yet.

Minor request: Add FARR variables for the FARR window's position (x y), width and height at the moment right before a result was triggered.

This lets us make results that can run a script with FARR position/size as parameters. The script can then position its window based on where the FARR window was.

edit: I forgot that we can make the script parse those values from these FindAndRunRobot.ini lines
But built in variables that can be used as parameters would be handy.

Does anyone know of a code editor or plaintext editor that has these features:

1 First view displays the full text (every editor has this!)
2 Second view of the same document side by side (many editors have this!)

3 The second view displays only filtered lines from the full text.
4 An inputfield for typing a string/regex that updates the filtered lines immediately.
5 Synced edits: edits in the full text view are synced to the filtered view, and vice versa.

bonus feature but not as important
6 Synced positions: caret position and scrolling is synced between both views.

This feature would be of use when renaming variables or repeatedly doing similar changes at various places in a document. Find/replace already exists of course, but filtering could be a useful complement and give a better overview. Another use case is to show all lines that has the string "todo" etc in them, which could give an overview of code locations you've tagged for working on later.

Some other viewing/navigating tools that, while useful, don't do the above.

Minimap, https://code.visuals...erinterface#_minimap
Instead of filtering this zooms out to show a map of the full text. The map highlights lines with matches when using find/replace, which is nice. But the minimap is too small to read the text on those lines and we can't edit inside the minimap.

Multiple views (and scroll and caret positions) for the same full (unfiltered) text. E.g. the "split editor" command in VS Code

Filtering tools that create and open a separate, non-synced file with filtered lines. E.g. Text Power Tools for VS Code, https://marketplace....qcz.text-power-tools

Markdown preview, https://code.visuals...-and-preview-locking
This syncs positions. Edits in the plaintext view immediately sync to the preview. But there is no filtering and no editing in the preview.

FARR aliases can already start actions that make use of the active window through the special FARR variable %LASTHWND%, which contains a window ID string. Example: use FARR to run a script with %LASTHWND% as command line parameter. The script can then condition what it does depending on what window was active. Close that window, or move it, or copy text from it, or whatever.

The new feature idea: Aliases conditional on active window
In the alias setup we would specify conditions on the active window that must also be met for FARR to trigger the alias. Conditions could be active window processname, window class and/or window title. Exact or regex matching.

In effect FARR would for each alias test two things:
- does the string typed by the user match the alias name/regex?
- does the active window match the alias conditionals set by the user?

If yes and yes then the alias is triggered.

For example an alias named "dl" (short for download) could show different results depending on if the active window is Firefox or Chrome or some other application. Or results depending on if the active Firefox window title contains " - YouTube" (one result action: a script to download the youtube video in the active tab) or " -" (two results: scripts to save the current tab as .html or .pdf).

Two different ways the feature could be exposed to users:
1 an extra box in the alias editing window, similar to the RegEx editbox.
2 a special prefix string at the start of each Results line.

With 1 the user would make multiple aliases for "dl".
With 2 the user would make one "dl" alias but then add more lines in the results box with the special prefix.
Mockup code for case 2:
#If(win_process = "Firefox.exe" and win_title = regex("^ - YouTube$") Save youtube video | C:\folder\script.ahk %LASTHWND%
Or alternatively put the conditional on a separate line and apply it to all results line below it until a new conditional line is encountered. Mockup:
#If win_process = "Firefox.exe" and win_title = regex("^ - YouTube$")

We can think of this feature a bit like how the context menu in Windows File Explorer shows different actions depending on what extension the selected file has. Or the #IfWinActive syntax for context-sensitive hotkeys in AutoHotkey.

Some more use cases: The alias "cs" could be used to immediately (using the special FARR string "dolaunch") run a cheat sheet file for the active application/process. Alias "help" could show help resources relevant to the active application.

Coding Snack request
a script/tool that auto creates .lnk shortcuts for all currently installed Windows Store Apps.

Users of Mouser's Find And Run Robot (FARR) requested an easy way to launch Windows Store Apps. The problem is that those apps do not create .lnk shortcut files FARR can find when searching files and folders. Users can manually create .lnk shortcuts one by one. But an automated method would be more user friendly. A standalone tool could also be useful for people who don't use FARR.

Research done

1. syntax for .lnk shortcuts to Windows Store Apps

Windows Store Apps can  be run from .lnk shortcuts with a target that has this format
explorer.exe shell:Appsfolder\<AUMID>
where AUMID (Application User Model ID) is a special string for each app.
For example on my PC we can launch Windows Calculator with
explorer.exe shell:Appsfolder\Microsoft.WindowsCalculator_8wekyb3d8bbwe!App

2. Powershell command to get a list of AUMID
The Powershell command
returns a list with an App name and its associated App AUMID on each line.
More details here https://docs.microso...-of-an-installed-app

3. Making .lnk shortcuts programmatically
AutoHotkey has the command FileCreateShortcut, https://autohotkey.c...leCreateShortcut.htm

What has already been tried
I didn't find a working way to use AutoHotkey to run Powershell with the get-StartApps command and output the resulting list to a .txt file.
I get this error
'get-StartApps' is not recognized as the name of a cmdlet

Instead of banging my non-powershell experienced head more against powershell error message walls, perhaps someone else here can think of a quick fix or different solution, using AutoHotkey, Powershell or some other method?  :)

AutoHotkey script to make Tab button toggle folders search on/off in FARR by adding/removing +\ to the searchbox.

Code: Autohotkey [Select]
  2. ;FARR helper script
  3. ;by nod5 181119
  4. ;Press Tab to toggle search only folders
  5. ;Note: Overrides FARR default Tab autocomplete hotkey
  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

FARR's default Tab shortcut autocompletes the selected results full path into the search box.

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.

N.A.N.Y. idea: file modification monitor and alert tool.

A Windows version of Marvin ( ) but with fewer features. Only daily or manually started checks (not realtime), only local notifications (not email/push).

Perhaps simply an AutoHotkey script that makes use of Everything's database and command line tool ( https://www.voidtool...mand_line_interface/ ) to check for changes to a user specified list of files/folders.

Useful as a safety precaution when using non-versioning, mirroring only backup tools like Bvckup2 ( ).

Before each backup job, check for unwanted modifications to files/folders on the monitoring list. A scheduled task for daily backups could first run the modification check tool and take conditional action: if no changes to files on the monitoring list then perform backup, else alert the user and postpone backup until manual confirmation.

For example if you accidentally and unknowlingly delete an important folder (on your monitoring list) in Explorer this tool would halt/alert you before you run a mirroring backup job that would delete the important folder also from the backup drive.

Request: add option that makes the launch and stay open command retain focus on whatever the keyboard input was before, including selection of one item in the results list.

Ctrl+doubleclick currently does that already.

But ctrl+Enter and the context menu command "launch and stay open" doesn't. They force focus to the searchbox.

FARR has the special string that lets us import one or more alias results line from a file. For example an alias can put the below string in the alias results setup and whatever is in C:\a.txt will be included in the results when a matching search is done.

Code: Text [Select]
  1. #filecontents C:\a.txt

But if the file is not found FARR instead shows this error message
Code: Text [Select]
  1. a.txt) --> file not found
  2. Error processing alias contents: C:\a.txt(C:\

Request: if the file isn't found FARR should simply ignore that line in the alias results instruction.

DC Member Programs and Projects / BigTimer
« on: April 15, 2018, 04:29 PM »
This is the new discussion/feedback thread for BigTimer


Pages: [1] 2 3 4 5next