Prompt User: possible to have multipe rows of buttons?

I have a step that prompts the user to press a button to continue. But there are so many options, that it would be nice to create a second row of buttons instead of having them all inline. Is this possible?

1 Like

Take a look at Big Buttons for a more flexible alternative.

2 Likes

As @mrpasini has said, the Custom HTML Prompt action is probably what you want.

Try this on for size:

Multiple Button Rows - HTML Prompt.kmmacros (24 KB)

Macro screenshot

3 Likes

Thank you very much. I've been trying to work this into my set of macros, but it's just beyond my abilities. I don't know HTML (or any scripting).

That looks like it would have done the trick. Just too complex for me to work into my macros, let alone make changes to down the road.

Thanks, guys.

Rather than give up, let's see if I can help you get to grips with it. I've labelled the actions, which might help you understand what's going on.

You can save this group of actions as a Favourite and call it up whenever needed. All you need to do is enter a few things into the green actions:

  • Prompt text: the text you want to appear above the buttons.
  • Button List: One button name per line.
  • Window Size: this needs to be manually adjusted so the KM HTML prompt window is properly sized. It's a trial and error thing until it looks nice.

The chosen button name will be saved as the variable Local__ButtonChoice, which can be accessed further along in your macro.

Multiple Button Rows - HTML Prompt.kmmacros (25 KB)

Macro screenshot

2 Likes

Thank you. Is there a way that I can assign a keystroke to each button? i.e. press "K" to automatically use the Kitchen button, "B" for Bedroom, "A" for Bathroom, etc.

Screenshot 2023-08-17 at 9.50.29 AM

Sure. How about this?

Multiple Button Rows - HTML Prompt NEW.kmmacros (28 KB)

Macro screenshot

5 Likes

That worked great. I finally got it working. Thanks again.

A few questions please?

  1. What is that carrot symbol that looks like a V in the Remove Button-Trigger step? What's going on there? I looked up the ascii chart and couldn't find that symbol or how to type it.

  2. If I click the buttons, it works flawlessly without any audio alerts. However, if I use the assigned keybind to trigger a button, the computer beeps at me like I did something wrong. Any idea why it beeps? Again, if I press the buttons, it doesn't beep at me.

Here's a quick sample of the alert-sound: https://www.youtube.com/watch?v=HGpyot_m8Rc

\ followed by /

Not sure. No beeps here.

1 Like

FYI I’m getting a beep as well. I'll look into it more when I have some more time.

But in the meantime, you’re the man, because a couple of weeks ago I was trying to figure out how to bind keys to buttons in a custom HTML prompt but didn’t make much progress. I ran out of time (and desire) to keep tinkering with it for the moment, but your sample macro works great for what I was trying to build.

2 Likes

For more context... that’s RegEx, and basically he’s just removing the trigger, or the forward slash / and proceeding character so as to save only the words to the variable.

1 Like

Apologies for the somewhat clipped answers earlier. I was typing under the table at dinner and had to be quick. :joy:

2 Likes

That would be really cool! I wasn't able to figure out what was causing them. I was just trying to throw delays in different spots to see if maybe something was getting triggered too quickly.

If you find the cause and fix it, can you please share?

I can't test this properly as I'm not hearing beeps myself (probably some notification preference I've set), but let me know if this solves the issue:

Multiple Button Rows - HTML Prompt.kmmacros (28 KB)

Macro screenshot

Thanks for giving it a go, but it still beeps for me. Attached are 2 macros.

"4c" is the one you built with a few additional steps. This is where I'm getting beeps.

"4a" shouldn't be needed in testing, but it's the full macro from start to finish. It simply uses MacOS to append prefix and suffixes to filenames. To make it work:

  1. select at least 2 files. I rename them "1.jpg", "2.jpg, 3.jpg", etc.
  2. press Home on your keyboard to start "4a" macro.
  3. It will ask you to highlight an address name. It can be any text. Just highlight some text. It will rename your selected files with that prefix.
  4. With your text highlighted, press End after the dialog box closes.
  5. This triggers your macro to add the suffix (being the room type).

Essentially, it renames a collection of files from
1.jpg
2.jpg
to
1234-anywhere-street-1-kitchen.jpg
1234-anywhere-street-2-kitchen.jpg
etc.

4c. Prompt for Room Type (HTML).kmmacros (16.5 KB)
4a. Rename NEW Designs.kmmacros (53.5 KB)

It doesn't matter whether it's my macro or yours; it won't beep for me, so I can't test/resolve it. Perhaps someone else might be able to.

@Bret @noisneil I’m out of town right now, but will look at this Monday to see if I can’t figure it out.

1 Like