Easiest way to edit a multi-line variable? Without opening KM Editor?

I want to be able to edit a variable that will be multi-line. I would like to trigger that edit from a menu command so that it shows something like the "Display Text" window, but that is not editable. Prompt for user input outputs everything on one line so is not really what I need.

How might I achieve this using built-in functionality? If not possible, I know I could create a custom HTML form for this, but was hoping for simple approach as far as possible.


Hello @Lloydi ,

Have you tried @DanThomas 's Spotlight KM Variables Vers 1.1 ?

If I remember it right you will be able to change the Value from it from everywhere.

Greetings from Germany


1 Like

I had not ... but I now have ... and this is precisely what I was after :slight_smile:

Thank you

You're welcome...

Please read the thread about the Spotlight Search Prompt carefully because Dan has posted an update to the OP with some new features and fixes somewhere ... It is absolutely worth it ...

Don't forget to mark my Suggestion as Solution so that other readers of this thread can follow.

Greetings from Germany


I don't know if this meets your needs or not, but you should check out my Variable Inspector Prompt:

This handles updating multi-line variables with ease. FYI, I'll be uploading a new version soon, but this version works just fine.


I can confirm that Dan's Macro "Variable Inspector Prompt" is the ideal way to edit Variables (and it does far more too!). I use it every day now. Thank you @DanThomas

If you want to build something into a specific Macro, one approach that I've used with success is to convert the multi-line Variable into a Keyboard Maestro Dictionary where each line becomes a Dictionary entry. Then it is possible to edit one of those entries and overwrite the original Variable with the edited line but keeping the rest of the Variable intact. Just a thought - and as you already have a solution I held back uploading an example.


This looks great, and I will definitely find a use for it. The initial spotlight variables one mentioned earlier is all I need right now, but I can see a time when I need to pull this more in-depth one out. Thank you.

1 Like