Dumping Dictionary Key Name/Value pairs

I know @JMichaelTX posted some examples (List (Display) Dictionary Contents - #5 by JMichaelTX) on dumping dictionary key value pairs but thought I'd post mine as well. I wrote my main one with the intention to be used during debugging via calling it using the "Execute macro" action and passing the name of the dictionary to the script. That way I can dump multiple dictionaries by changing the variable value and calling the same macro again.

Macro to dump one dictionary

This macro takes the name of a dictionary via the Instance_DictName variable, extracts the key names and their values and displays them all in a window.

If you just want to dump a dictionary immediately, enable the Set Variable action after the top comment and enter the name of the dictionary you want to dump. Just don't forget to disable the action if you're going to call it from another macro!

Example Output:

Macro

Macro to dump all dictionaries

No sample output as it's the same as the one dictionary dump, but you get a new window for each dictionary (fair warning, if you have a lot of dictionaries it'll be a lot of windows!)

This one uses the cheat of setting the For Each variable to the variable that the Dictionary Dump macro uses so I don't have to do any variable manipulation.

Macro downloads:

Dictionary Debugging Macros.kmmacros (7.6 KB)