I thought of another way to accomplish similar effects via hotkeys. A quick brainstorm on that.
We can already create FARR hotkeys that takes the selected file result (or first file result if no selection) from the previous search and makes a new search. That can be combined with an alias that when triggered immediately shows a filepath as HTML in FARR.
For example in FARR set up the hotkey Ctrl+H with option "Set Search text ..." enabled and this string
html_alias %CURRENTRESULTNB%
Then create the alias
name: html_alias
regex: ^(html_alias) (.+)$
result: dolaunch showfilehtml $$2
Now Ctrl+H will try to show the currently selected (or first) FARR file search result as HTML inside FARR.
A problem with this, though, is that FARR creates global hotkeys so pressing Ctrl+H in other windows will open FARR.
That problem could be solved if FARR got an option to choose if a custom hotkey should be global or local. Another solution is to create the hotkey in AutoHotkey instead, and have it mimic what the FARR hotkey above does.
A more advanced idea along these hotkey lines is to let the effect of a hotkey be conditional on the contents of the FARR search box. For example if the search box starts with "tl " (my example alias in the first post) then Enter would open the selected file result as HTML in FARR. In other cases Enter would work like usual (open file in default application). This could be done by enhancing the FARR hotkeys features. Or again as an external AutoHotkey script.
edit:We can skip the extra alias step by using FARR's command line options. Simple AutoHotkey example for a local hotkey to show the selected (or first) FARR result as HTML.
; hotkey Control + H when FARR window is active to show selected (or first) FARR result file as HTML
; 2020-10-27
; note: using this hotkey on non-HTML files is unpredictable, may freeze/crash FARR
^h::
RunWait "C:\Program Files (x86)\FindAndRunRobot\FindAndRunRobot.exe" -launch
"showfilehtml `%CURRENTRESULTNB`%"
; references:
; https://www.donationcoder.com/Software/Mouser/findrun/help/commnadline_options.htm
; "-launch = start FARR (or invoke in a running copy) and launch a command (can use any normal FARR launch strings ..."
; https://www.donationcoder.com/Software/Mouser/findrun/help/virtual_launch_strings.htm
; "showfilehtml FILENAME - show a file in html mode"
; https://www.donationcoder.com/Software/Mouser/findrun/help/virtual_folder_names.htm
; "%CURRENTRESULT% - currently selected result; useful for creating hotkeys that use it, etc.; blank if nothing selected"
; "%CURRENTRESULTNB% - same as above, but = first result if nothing selected"
This can also be expanded to use the command line to first read the FARR result to clipboard (-launch "copyclip %CURRENTRESULTNB%"), add code steps to verify that it is a .html (or do some other checks) and only the file passes those tests show it as HTML. But every roundtrip via the command line to FARR takes ~150ms in my tests.
@mouser: it would be neat if we could do anything the FARR CLI "-launch" syntax lets us do but through SendMessage, to save the time currently wasted by starting/closing the command line process.