This is like the native Prompt for User Input action, with a lot more features.
Partial list of features:
Resizable, with scroll bars if needed.
Tab to all fields, including pick lists, checkboxes, and buttons.
Loooooooong labels.
Multi-line strings.
Dark Mode support.
And much, much more. See the video for more information.
Version History
1.2.0 - Added Radio Buttons. Tweaked a few cosmetic things. 1.1.1 - Fixed Hotkey Bug. 1.1 - See Documentation (post-video features / changes) below for details 1.0 - Initial Release
Documentation (post-video features / changes)
Variable Names with Spaces (v1.1)
DIP now supports variable names with spaces.
However, spaces might get replaced by underscores. So be aware that variable names like these:
Local First Name
Local_First_Name
may be treated as the same variable name. But don't count on it - it's complicated.
Populate PickLists at Runtime (v1.1 & 1.2)
I added a new field for PickLists (and Radio Buttons) called Items Variable Name. If you want to supply the items at runtime, set this field to the name of the variable that will provide the items.
Then prior to running the prompt, set this variable to your items, the same way you would set PickList Items or Radio Button Items in the builder.
NOTE: For DataSource "JSON", this variable name can't be a local variable. It must be an Instance or Global variable. The Builder verifies this.
Radio Buttons(v1.2)
Added Radio Buttons, aka Radio Groups.
You can specify multiple columns and a few other things. You can tab to a radio group, and use arrow keys to move around.
There's also an Items Variable Name just like there is for pick lists.
Bug Fixes
V1.1
Fixed missing "Regenerate" button in Template Id field.
Installation
UPGRADE INSTRUCTIONS:
Delete the old macros and resources.
If you can't remember where you put the resources, you can run the macro: DIP - Finish Installation / Show Resource Folder
After deleting the old macros and resources, follow the steps below.
Download the zip file and unzip it.
Unzip the contents of DIP Resources.zip into a folder of your choosing.
Double-click the .kmmacros file to install it in Keyboard Maestro.
Enable the Group DIP - Dynamic Input Prompt.
Run the macro DIP - Finish Installation / Show Resource Folder and enter the path to the Resources Folder from step #2.
What a monstrously large project this is. I bow to your ultra-greatness. This project looks roughly as impressive as KM itself.
Although I understand the general idea that you're doing here, I don't understand what I'm looking at. Is everything you are writing written in KM? Are you mostly accomplishing this with Custom HTML Prompt actions? Is most of this written in Javascript running in a Custom HTML Prompt action? Or is there something else that you're using?
While there are certainly macros supporting it, most everything is done in a Custom HTML Prompt, with a crap-ton of javascript. Almost 13,000 lines (including comments), not including the "flatpickr" library that handles the date/time picker.
I started it at the end of November, and have been working on it pretty-much full time. The tutorial video took weeks and weeks to get done, partly because I kept noticing things I wanted to add or fix.
The biggest reason the project is so massive is because ChatGPT helped me do things I wouldn't have even tried without its help.
Whew! I'm so glad. That video was a huge PITA. I'm not one of those people who can just talk and type and navigate with a mouse all at the same time. So piecing it all together takes me freakin' forever!!
I finally had a chance to view the video. I don't usually care for video instructions—bandwidth issues—but in this case it's completely justified and valuable.
Dan, you've demonstrated that KBM is an f'n development framework. Kudos to both you and @peternlewis. Thanks again.
Dan this is incredible. Thanks for all your hard work, and a special thanks for sharing. BTW - I know the video added much work, but it makes a big difference.
Thanks again.
Amazing work!
I really appreciate the option to add multi-line strings and the subtypes for folder and files (very useful when I share macros with coworkers)
@DanThomas Thanks again. Already using DIP in a few of my macros and it's working great.
One thing I'm trying to replicate that I do in a couple of my macros is creating a dynamic Pick List from a variable. Is there a way to accomplish that currently with DIP?
Additionally, I don't seem to be able to set a default value via a set variable to text action ahead of running the DIP instance, i thought I saw you mention you could do that in the video but I might be mis-remembering!
As for setting the variable beforehand, it should work just fine. Make sure you're using the correct variable name. If you look at the action with the template in it, you should see the list of variable names near the top:
Right-click the line below, and select "Open Link":
kmtrigger://m=8B74E459-A3C2-4377-8B6A-22869610A501&value=edit|variables
{
"variableNames": [
"Local_firstName",
"Local_pickList"
],
As for supplying the pick list values, there's no simple way to do that currently, but that's a great idea. I'll see what I can do.
Thanks! Seems like setting the variable prior to running the DIP Prompt doesn't work if the variable contains a space. Works fine if it doesn't, so no big deal there.
One other small thing i noticed is that it seems the "regenerate" button next to the TemplateID field in the designer is missing when I run the macro. I've been manually editing the template ID but am not sure if there is something I did wrong to cause that, or if it's just a bug.
I figured out why a variable name with a space doesn't work, and I'll fix it.
Regarding the regenerate button missing, that's clearly a bug because it's missing on mine too, so I'll fix it.
Are you running with any sort of uncommon screen resolution? I'm noticing that some of the glyphs look funny in your screenshot, like button on the right in the pick lists.