Dictionary Utility

I'm prepared to upload my "Dictionary Utility" here, which lets me view/modify/delete/duplicate my existing dictionaries and their keys.

But before I do, I would like feedback from people here as to whether it does everything they want. Also, I'm not very good with Custom HTML so my use of that action is pretty basic, and could probably use some tweaking by the experts here. Let me post some screenshots so you can see what my utility does before I post the code.

The first thing you see is the following (wide) window. If you press Cancel, it stops, but if you press any other key, it will perform that action and then return to this window. It's done this way (in a loop) because usually I'm doing multiple dictionary actions in a row, so putting it in a loop seems appropriate and natural.

For several of the buttons, the first thing you have to do is display which dictionary you want to do the operation on, so a dictionary selection window appears in the form of a Custom HTML dialog box. My skill with Custom HTML is pretty poor, so it's always a full screen window with large buttons. (I would prefer a dynamically-sized form, but in that case it should be able to shrink the button size so that all the names fit in the window. I'm not sure how to do that yet.)

Once you pick the dictionary you want, the next dialog box depends upon which function you selected. Here's the Duplicate Dictionary dialog box: (the Delete Dictionary button looks very similar)

Duplicating a dictionary could be a good way of "making backups."

The Erase Key button also pulls up a similar Custom HTML dialog box, but in addition to naming the dictionaries, it names the keys in the selected dictionary to allow you to delete one.

The Get Stats button displays stats for all your dictionaries in a window. I won't show you my stats because I would prefer not to show all my dictionary names and keys. This is an interesting feature of this macro, but you'll have to try it to see how interesting it is.

The Set Value button brings up the following:

The Modify Value button uses Custom HTML windows to pick the dictionary and key, letting you specify the value in this window": (this screenshot contains an example dictionary name and key name)

If people propose other dictionary functions, I can possibly add them before I upload the macro here. (I realize now I could add a Rename Dictionary button, but that's not really any different from the two steps of "Duplicate Dictionary" and "Delete Dictionary." So it's probably not needed.)

1 Like

This is great work! It looks like everything we could want. Thanks, Sleepy!

Just sharing some ideas that I have done in the past

One way to avoid custom prompt is to to change it into Prompt List to leverage on search capability and context menu .
the delimiter use is > , where left item is dictionary name, right item is key

and Ctrl+double-Click to show context menu , like for example,

That's interesting. I don't think I had considered it. It might have been sufficient in this case, but the Custom HTML prompt is 100x more powerful and I think I want to become skilled with it in the future.

1 Like

I'd love to try this utility. Where do I find it?

1 Like