Finder Assistant – ReadMe Excerpt
Description
Finder Assistant is a Keyboard Maestro macro set that provides a means to complete common Finder tasks. Although there is no direct integration, used in combination with Alfred's Universal Actions, almost every Finder task can be completed with the keyboard.
Getting Started
Dependencies
Finder Assistant has been tested with Keyboard Maestro v11.0.2; however, it might function properly with v10.2. Moving forward however, due to the complexity of the macro set, there will be no attempt to support outdated versions of Keyboard Maestro.
Installing
-
Download and unzip the Finder Assistant zip file.
-
Install the main macro and supporting subroutine macros by double-clicking the macro export (file with the kmmacros extension). The main macro and 42 subroutines will be installed on a group named ⋮Finder Assistant.
-
Enable the ⋮Finder Assistant group and the primary macro: Finder Assistant. The 42 subroutines do not need to be enabled.
-
After running Finder Assistant and reading the introductory dialog and comments within the configuration file (i.e., Favorite Folders File), optionally copy the files within the Templates folder to the location instructed.
Configuration Settings
-
Macro Settings: Finder Assistant (FA) includes several configuration settings within the macro. These settings are identified with comments (magenta) and variable actions (orange). The default settings should be initially used and only adjusted after understanding the basic operation and features of FA.
-
Favorite Folders File (FFF): This is a plain text file that is created and managed by the macro, however, it can be also modified using any text editor.
-
File and Folder Templates: Default file and folder templates are provided, but others can be freely added at any time.
Hot keys
The primary and secondary hot keys for Finder Assistant,⌃⇧F
and ⌃⌥⇧F
, can be freely changed with one restriction: the secondary hot key must include the option key (⌥
).
Executing Finder Assistant
Finder Assistant is normally executed using the primary hot key. The response is context sensitive, based on the items selected (or not) within the Finder at the time the macro is started.
-
If one or more Finder items (files and/or folders) are selected, a menu is displayed that contains up to elevan options: Move, Keep, Enclose, Zip, Copy, Alias, Replace, Tag, Write, Navigate, Save.
-
If a Finder window is open, but no items are selected, a menu is displayed that includes three option: Write, Navigate, and Save.
-
If a Finder window is not open, or if one or more are open but none have focus, the Navigation menu is displayed.
-
The macro includes many other context-sensitive nuances that will be discovered as the macro is used.
If a macOS application (e.g., Preview) Open or Save dialog is open, the Navigation menu will appear if the secondary hot key triggers Finder Assistant. This can be used to quickly switch to a Favorite Folder.
Additional Information
Additional information is provided in the introductory dialog when Finder Assistant is first executed. The Favorite Folders File also includes helpful comments for configuration and operation.
Design Notes
-
Finder Assistant (FA) is a complex macro, but by employing context sensitivity combined with menu and dialog cues, and the overview documentation provided in Favorite Folders File (FFF), it should be relatively easy to understand.
-
The verbs used in FA (i.e., Move, Keep, Enclose, Zip, Copy, Alias, Replace, Tag, Write, Navigate, Save) used in Finder Assistant were selected so that menu selections could be made with the fewest possible keystrokes (i.e, each begin with a unique letter). For more information, refer to the FFF.
-
FA is designed to complete the various Finder tasks within the active Mission Control Desktop Space. It will effectively ignore Minimized (but not Hidden) Finder windows and also all Finder windows open in other Desktop Spaces.
Acknowledgments
This macro was inspired by at least five other macros:
-
[FINDER] Move Selected Finder Items to Choose Folder [Example] - Macro Library - Keyboard Maestro Discourse, by the late @JMichaelTX
-
A Few Favorites Macro (v9.1) - Macro Library - Keyboard Maestro Discourse, by @mrpasini
-
Move Selected Finder Items to the Specified Folder - Macro Library - Keyboard Maestro Discourse, by @ccstone.
-
Move to Specifed Folder -- Add Selected Folder in Finder, by @ccstone
Based on everything I’ve learned from others on this forum, there are probably other techniques I’ve borrowed from others. (If there are other macros that come to mind, please bring them to my attention so I can include the proper attribution.)
Finder Assistant – Miscellaneous information
Context Sensitivity: the options presented depend on the Finder selection (or non-selection)
For example, with FA's initial menu...
a. If a Finder window is open and one item (a file or folder) is selected (in this case ~/Pictures/2022/IMG_8503.jpg
is selected), then the following will appear:
Note that the item selected is indicated in the Finder Assistant Options.
See below for more information about the eleven Finder Assistant Options—FAO's: Move, Keep, Enclose, Zip, Copy, Alias, Replace, Tag, Write, Navigate, Save. In the example above, the Replace option is excluded because the selected item is not an alias.
b. If a Finder window is open and two or more items are selected, then the following will appear:
In this case, selected items is indicated rather than a single filename. Again, the Replace option is excluded because none of the selected items is an alias.
c. If a Finder window is open and active, but no items (i.e., file or folders) are selected, FA keys off the frontmost Finder tab (which is always a folder) and presents a subset of the FAO's: Write, Navigate, Save:
For the example above, the 2202 folder was open in the frontmost Finder tab, but again no items were selected. In most cases, two (if item is a file) or three (if item is a folder) Save options will appear: one for the item itself (if it is a folder), one for the Parent folder, and one for the Grandparent folder. However, in the example above, the Parent (Pictures, i.e., ~/Pictures) is included, but the Grandparent (~) is not because it is already configured in the FFF.
d. If no Finder windows are open, or if one or more Finder windows are open, but if none are focused, the following will appear:
In the above case, the menu that normally appears first that contains the Finder Assistant Options—FAO's is bypassed, and the Navigate option is automatically selected and a menu is created and rendered based on Navigate and the folders configured in the FFF*.
Menu and Dialog Cues
a. Menu Cues
In addition to the single file selection (vs two or more files) feedback, FA also includes cues in the first one or more lines of each Prompt With List menu. Here's an example for the first FA menu:
Here's an example for the second FA menu (assuming Copy was selected from the first FA menu):
b. Dialog Cues
Example 1—If Navigate to ⇨ (some other folder) is selected from the Navigate menu, the following dialog appears:
Note that the dialog cues are also context-sensitive.
Example 2—If a folder named 2202 was selected using the above dialog, and Command (⌘) was not down, the following dialog would appear:
Note that this dialog includes several cues.
Example 3—If the Tag option is selected, the following dialog appears:
Overview Documentation provided in Favorite Folders File (FFF)
Admittedly, this documentation is terse, but it can serve as a quick memory jogger. As mentioned above, the FFF can be quickly opened from every FA menu using ⌃⇧return. Also, my thought was that FA's introductory dialog that suggests viewing this file would help users recognize the value of this information.
Macro Group
After installation, one macro, Finder Assistant, and 42 subroutine macros will be located in the ⋮Finder Assistant macro group.
Finder Assistant
𝗌.𝗳⇾AppendToFile
𝗌.𝗳⇾GetFavoriteFoldersContent
𝗌.𝗳⇾GetFavoriteFoldersPaths
𝗌.𝗳⇾GetFavoriteFoldersPrompts
𝗌.𝗳⇾PrependToFile
𝗌.𝗳𝗻𝗱⇾AliasItemToPath
𝗌.𝗳𝗻𝗱⇾CopyItemToPath
𝗌.𝗳𝗻𝗱⇾CreateNewFolderOrFile
𝗌.𝗳𝗻𝗱⇾CreateUniqueFolder
𝗌.𝗳𝗻𝗱⇾CreateUniquePlainTextFile
𝗌.𝗳𝗻𝗱⇾EncloseItems
𝗌.𝗳𝗻𝗱⇾GetActiveTabPath
𝗌.𝗳𝗻𝗱⇾HasFocusedWindow
𝗌.𝗳𝗻𝗱⇾KeepItemToPath
𝗌.𝗳𝗻𝗱⇾MoveItemToPath
𝗌.𝗳𝗻𝗱⇾NewFinderTabInSpace
𝗌.𝗳𝗻𝗱⇾NewTabOrWindowInSpace
𝗌.𝗳𝗻𝗱⇾NewWindowInSpace
𝗌.𝗳𝗻𝗱⇾ReplaceAliases
𝗌.𝗳𝗻𝗱⇾SetActiveTabPath
𝗌.𝗳𝗻𝗱⇾Tags
𝗌.𝗳𝗻𝗱⇾UnminimizedWindowCountInSpace
𝗌.𝗳𝗻𝗱⇾ZipToPath
𝗌.𝗽⇾AbbreviateFolderPath
𝗌.𝗽⇾AliasTarget
𝗌.𝗽⇾AreAllItemsAliases
𝗌.𝗽⇾AreNoItemsAliases
𝗌.𝗽⇾ChooseFolder
𝗌.𝗽⇾ChooseOrValidateTarget
𝗌.𝗽⇾ConvertPath
𝗌.𝗽⇾GetStartupDisk
𝗌.𝗽⇾IsFolderWritable
𝗌.𝗽⇾ItemType
𝗌.𝗽⇾LongToShort
𝗌.𝗽⇾PathsMatch
𝗌.𝗽⇾SearchListForPath
𝗌.𝗽⇾SelectionPaths
𝗌.𝘂⇾ListLineCount
𝗌.𝘂⇾ListLineN
𝗌.𝘂⇾ProtectUnderscores
𝗌.𝘂⇾StripComments
𝗌.𝘂⇾UnprotectUnderscores
Installation File
2024-04-08 Finder Assistant.zip (765.4 KB)
Macro-Notes
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System Information
- macOS 14.3.1 (23D60)
- Keyboard Maestro v11.0.2