Prompt With List... On Steroids! πŸ’ͺ🏼

Features:

  • Return multiple results.
  • Set prompt size.
  • Set font family and size.
  • Scroll list using Page Up/Down.
  • Allows for String1__String2 input, where String2 is displayed and String1 is returned.
  • System-aware darkmode switching.
  • Click away or press Escape to dismiss.

Choose a single list entry:

  • Double-click or press ↡.

Choose multiple entries:

  • Single-click or press ⇧↡ to mark/unmark individual entries
    ...or Hold ⇧ and either use the up/down arrows or click with the mouse to mark multiple adjacent entries
    ...or Click and drag with the mouse to mark multiple adjacent entries.
  • Press ↡ to submit all marked entries.

Marked list entries are denoted by a βœ“ at the left of the list.


MACROS:

Prompt With List (HTML).kmmacros (68 KB)

Macro screenshot

Prompt with List (HTML) - Click Away to Dismiss.kmmacros (39 KB)

Macro screenshot

Prompt with List (HTML) - Example Caller.kmmacros (22 KB)

Macro screenshot

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:

19 Likes

Subscribing because this has already been a nice addition to several of my macros. Thanks @noisneil!

-Chris

1 Like

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.

test

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. :+1:t3:

This is a great macro, @noisneil :sunglasses:

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 :wink:

4 Likes

@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 :stuck_out_tongue:

  • 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

Yessss @ChrisQ !

Keep the pressure up while he’s delirious from all this praise and weakened by all his efforts :crazy_face:

5 Likes

Good idea!

Done.

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.

:joy::joy::joy:

4 Likes

Well geez, I might as well chime in with my request as well... :sweat_smile:

How about allowing multiple selections by holding the shift key and hitting the up or down key?

1 Like

Hi Neil - that's above and beyond. :people_hugging:

2023-09-14_17-36-39

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

Magic, Neil :magic_wand: Thanks!

1 Like

How about Shift to select/deselect. Holding down Shift and Up/Down to multi-select/deselect. :slight_smile:

I think I've got it working...

Prompt With List (HTML).kmmacros (36 KB)

Macro screenshot

CleanShot 2023-09-14 at 20.46.24

5 Likes

Really good stuff.
I'm probably out of line here...

Can the Prompt List 'look' to display the contents of a .txt file?

Sure...

3 Likes

Original post updated with all current features.

3 Likes

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. :+1:t3:

2 Likes

@noisneil - You on :fire: and the force has been with you! So many lessons with this.

Excellent work and Thank You for sharing!

KC

3 Likes