Features:
Return multiple results.
Return results in order they were selected (optional).
Set prompt size.
Set font family and size.
Scroll list using Page Up/Down.
Select/submit items using β₯/β plus the row number, respectively.
Allows for String1__String2 input, where String2 is displayed and String1 is returned.
Pre-select entries by adding a custom tag to input lines
System-aware darkmode switching.
Click away or press Escape to dismiss.
Navigate:
Trigger
Action
β/β
Navigate up/down through items
---
---
Page β/β (or Fn + β/β)
Scroll through the list quickly
Select:
Trigger
Action
β
Toggle selection of current item
---
---
β§β/β or click-drag
Select a range of items
βA
Select all items
β₯ + 1-9
Select numbered item
NB: if there are nine rows or fewer, they will appear numbered
Submit :
Trigger
Action
β΅
Submit selection (current item if none selected)
---
---
Double-click
Submit a single item
β + 1-9
Submit numbered item
Marked list entries are denoted by a β at the left of the list.
MACROS:
PWLOS.kmmacros (256.3 KB)
If you leave Prompt Size , Prompt Font or Font Size empty, these values will default to those set in the Prompt Defaults group.
Dark Mode:
Light Mode:
Custom Colours:
22 Likes
Subscribing because this has already been a nice addition to several of my macros. Thanks @noisneil !
-Chris
1 Like
ChrisQ
September 14, 2023, 2:55am
3
Hi @noisneil , thanks for adding even more functionality to this prompt.
I noticed that scrolling with the arrow keys works fine until an item is selected using the mouse click. Then the arrow key scrolling seems to be skipping.
ChrisQ
Oops! I forgot to restore focus to the list itself after the mouse click. I've fixed it above, so download the new version.
tiffle
September 14, 2023, 2:32pm
5
This is a great macro, @noisneil
Maybe you can turn it into a subroutine that takes the following parameters:
font name
window size
text of list
and returns the chosen item(s) ?
Oh - and while I'm asking maybe you could give up your day-to-day life to help out us other needy KMers
4 Likes
ChrisQ
September 14, 2023, 2:39pm
6
@noisneil , the updated version looks good. Thanks!
@tiffle , LOL, my thought exactly. I was going to ask if we could request more functionality. Along with what you suggested....i'll add in some more
pressing Page Up/Down also scrolls the list
parameters for everything: font, colours, etc
instead of Shift + Enter to select, could we set a parameter as well? I would like Control key
2 Likes
tiffle
September 14, 2023, 2:44pm
7
Yessss @ChrisQ !
Keep the pressure up while heβs delirious from all this praise and weakened by all his efforts
5 Likes
tiffle:
font name
window size
text of list
Good idea!
Done.
ChrisQ:
parameters for everything: font, colours, etc
I've done font and font size, but I think much more than that and we're getting into diminishing returns.
It's not as simple as typing a key into a variable to switch between key combos and single keys. However, if you'd like to use β, I've included a (currently disabled) version of the HTML action that will do that.
Prompt Caller.kmmacros (21 KB)
Macro screenshot
Prompt With List (HTML).kmmacros (44 KB)
Macro screenshot
Note that if you leave Prompt Size , Prompt Font or Font Size empty, the prompt will default to the values set in the Prompt Defaults group.
4 Likes
Well geez, I might as well chime in with my request as well...
How about allowing multiple selections by holding the shift key and hitting the up or down key?
1 Like
tiffle
September 14, 2023, 4:39pm
10
Hi Neil - that's above and beyond.
Just looking to trim the thickness of that border now...
You'll want to fiddle with the end number of each of these lines under the init section:
var inputWidth = promptSize[0] - 100;
var listWidth = promptSize[0] - 100;
var listHeight = promptSize[1] - 135;
1 Like
ChrisQ
September 14, 2023, 5:10pm
13
How about Shift to select/deselect. Holding down Shift and Up/Down to multi-select/deselect.
I think I've got it working...
Prompt With List (HTML).kmmacros (36 KB)
Macro screenshot
5 Likes
troy
September 14, 2023, 8:16pm
15
Really good stuff.
I'm probably out of line here...
Can the Prompt List 'look' to display the contents of a .txt file?
Original post updated with all current features.
4 Likes
ChrisQ
September 14, 2023, 10:03pm
18
Hi @noisneil , does searching with multiple strings still work? It's seems to be broken in the subroutine.
Thanks for flagging that. Adding new features caused a conflict. Fixed in the first post now.
2 Likes
kcwhat
September 15, 2023, 12:30am
20
@noisneil - You on and the force has been with you! So many lessons with this.
Excellent work and Thank You for sharing!
KC
3 Likes