Topics - Nod5 [ switch to compact view ]

Pages: prev1 2 [3] 4 5 6 7 8 ... 22next
11
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
C:\Users\<username>\Documents\DonationCoder\FindAndRunRobot\AliasGroups\MyCustom

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

Screenshot:
rel.png

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

abs.png

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
rel_copied.png

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
https://www.donationcoder.com/Software/Mouser/findrun/help/alias_tricks.htm
/icon=localfilename_from_aliasdir.ico (icon file must be in same dir as the source xml file defining the alias)

12
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.

13
Microsoft keeps adding nice stuff to the revived PowerToys apps
https://github.com/microsoft/PowerToys

Most recently PowerToys Run, a launcher app that has some similarity with FindAndRunRobot
https://github.com/microsoft/PowerToys/tree/master/src/modules/launcher

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.

1.png

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.png

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

3.png

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

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

4.png

5.png

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.

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

Background
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%
  2.  
  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
  6.  
  7. ; Get active the window's handle (Hwnd) from parameter passed by FARR
  8. vHwnd := A_Args[1]
  9.  
  10. ; verify that the window is Explorer
  11. WinActivate, ahk_id %vHwnd%
  12. If !WinActive("ahk_class CabinetWClass ahk_id " vHwnd)
  13.  
  14. ; get filepaths for selected files
  15. aFiles := ExplorerHwndSelectedFilepaths(vHwnd)
  16.  
  17. ; ----------------------------------------------------
  18. ; add code to take action on the files here
  19.  
  20. ; example: show each filename in a messagebox popup
  21. For Key, vFile in aFiles
  22. {
  23.   SplitPath, vFile, vFilename
  24.   MsgBox % vFilename
  25. }
  26.  
  27. ; ----------------------------------------------------
  28.  
  29. ; exit script when finished
  30.  
  31.  
  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.     ; https://docs.microsoft.com/en-us/windows/desktop/shell/shellfolderview-selecteditems
  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. }

Preparation
Install AutoHotkey, https://www.autohotkey.com/

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.

Note
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.

1.png

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

2.png

Select files in Explorer, Open FARR and use the alias

3.png

Text files are created.

4.png

Take important notes.

5.png

15
I noticed that if I open an incognito tab in Chrome or Firefox and load donationcoder.com 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.

Pages: prev1 2 [3] 4 5 6 7 8 ... 22next
Go to full version