Request: Prompt for Snippet enhancements

I love the new (v11) Prompt for Snippet action. It makes a number of tasks much easier in Keyboard Maestro, including replacing a complicated Prompt for Input box with something simpler.

But I'd love it even more with a couple of enhancements, @peternlewis :). First off, I'd love to be in control over its size, but it seems to have a set width (and height varying based on content). It responds to the Center option of Set Next Engine Window Position, but not the Size option.

Second, and of more use to me, I think there should be an option for what's returned from the snippet box. As it works now, it returns everything that was in the input box:

However, for use further on in a macro, all I want is the actual values the user entered, not the labels that helped them enter those values. Can we get a checkbox that would have only the input text stored in the variable?

I can work around this, of course, by processing it via regex (find everything up to and including the colon-space and remove it), but it'd be nice to skip that extra step. How about a Gear menu option for "Return input values only" or something like that?

Thanks for listening!


1 Like

It's possible I could allow similar width options as some of the other prompts have (Narrow/Normal/Wide or whatever). It's difficult as it needs to deal with laying out the arbitrary values.

As for returning just the values, I'm not sure how that would work unless it returned it as some sort of JSON structure. If you had multiline fields, how would you be able to tell which elements were which?

I was thinking you could handle it the same way you handle Prompt With List, i.e. something like…

localMyVar__The displayed input text%Ask20%

So whatever they fill in for that row gets stored in localMyVar. It could still work just like it does now if you don't use that layout, so inputting big blocks of text would still work fine.

The way I've worked around it so far is to just make my input text ugly:


I then used a regex to find any given input item's value ((?m)^Title__(.*)$). But it'd be great if the output were a series of variables and associated values.


1 Like

I'll ponder it, but I'm not thrilled with that idea.

I understand, and can work around it with dynamic variable assignments :slight_smile: ... and I posted just such a demo macro: