Add Color Picker to Your Macros

April 19, 2019

With a new update, you can now use Color Picker in your Macro dialogs using DialogBox_AddColorPicker function. In the past when a macro needed user input for a color, the only option was to use a text box and ask for a hex color code which is much harder for users who just want to pick a color from a set of common colors.

Color Picker control looks like this in a dialog box:

Color Picker control

When user clicks on the dropdown, the standard Windows Color Picker is displayed to allow user to pick a color:

Color Picker window

Along with the color picker, a new base type Color is added. Certain properties of objects, like fontColor or highlightColor used to be String types. They are now using the new Color type. Color type has a few advantages over the String type. If a font color of a text is red, previously doing $text.fontColor == "red" wouldn't work, you would have to use the hex format (#ff0000). Color type is smart enough to compare color names and values, therefore such comparison or assignment will now work. There is also a new Color function to create variables of type color.

Macros that used to offer a dropdown with a set of predefined colors will be updated in the coming days to use the color picker.

Update information for Macros

Another feature added in the new update is the ability to see what updates are available for an installed macro. If you are looking at the details of an installed macro in Download Macros window, you will now see which updates are available and which version you currently have installed:

Available updates

This way you can see what the new update offers and decide whether you want to update to the new version of a macro or not.

Comments

Name
Comment
null - 2020-01-23
null - 2020-01-23
JBM - 2019-10-15
A quick (hopefully) easy question: What does the macro "Clean Authors" actually do? I download the "Clean Hyperlinks" which I use and makes sense (eliminates any hyperlinks in a page/section). But I don't know what the "Clean Authors" macro is supposed to do. I know I'm missing something.
Thanks.

Other Posts

Show all posts