This tutorial provides a macro that shows how to use four methods available in Keyboard Maestro to provide a prompt for the user to select an item from a list.
- Prompt For User Input with Popup field
- Prompt With List
- AppleScript with Choose From List
- Spotlight-like Prompt by @DanThomas
Each of these methods has advantages and disadvantages. IMO, all of them should be tools in your automation toolkit, so you can always pick the best tool for the job.
Personally, #4 is my favorite, even though it takes a bit more effort to setup.
In the interest of time, I am going to leave it like that for now. I'll come back later to add more discussion. However, there are a lot of key comments within the Macro.
Meanwhile, please feel free to post your questions, comments, and/or suggestions for improvements.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MACRO: Methods to Pick from a List [Tutorial]
~~~ VER: 1.0 2020-01-11 ~~~
Requires: KM 9.0.2+ macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
DOWNLOAD Macro File:
Methods to Pick from a List [Tutorial].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.
Example Output
Select Method To Use
OPTION 2. Prompt With List
Results
ReleaseNotes
Author.@JMichaelTX
PURPOSE:
- Provide Examples of Four Methods of Using a Pick List in KM
HOW TO USE
- First, make sure you have followed instructions in the Macro Setup below.
- Trigger this macro.
- Select the Pick List Method you want to use.
- Observe the results.
- Study the Macro to learn and understand each of the methods.
MACRO SETUP
-
Carefully review the Release Notes and the Macro Actions
- Make sure you understand what the Macro will do.
- You are responsible for running the Macro, not me. ??
.
Make These Changes to this Macro
- Assign a Trigger to this macro.
- Move this macro to a Macro Group that is only Active when you need this Macro.
- ENABLE this Macro, and the Macro Group it is in.
.
-
REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:
(all shown in the magenta color)- This Macro may be run as is, but you may want to customize it for your use case
- Local__ListOfChoices
- Messages set based on Item selection, in the Switch Case at the bottom.
- Spotlight Search Prompt Options
REQUIRES:
- KM 9.0+ (may work in KM 8.2+ in some cases)
- macOS 10.11.6 (El Capitan)+
- MACRO: Spotlight Search Prompt by @DanThomas
TAGS: @Prompt @PickList @Lists @AppleScript @Tutorial
USER SETTINGS:
- Any Action in magenta color is designed to be changed by end-user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~