Suggestion: Allow "Create New Image" to receive parameters

Sometimes for web design, I need images with a certain color and dimensions. It would be great if I could create a macro asking for colors, dimensions, and have KM easily create the image for me (create blue 300x500).

https://wiki.keyboardmaestro.com/action/Create_New_Image

Unfortunately, this action doesn't accept parameters (like from prompt actions).

Please consider. Thank you.

True, as far as I know you can't use parameters for the color, but you can for the dimensions, and it's also possible to make a macro that makes it easy to choose from a pre-determined list of colors that can be as long as you're willing to make it:

Prompt for New Image.kmmacros (4.3 KB)

this should get you started. Since we can call a KM Action via AppleScript using the Action's XML, we can fully customize the Action.

Example Output

image

image

Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MACRO:   Set Clipboard to New Color Image Using KM Action via Script [Example]

-~~~ VER: 1.0    2020-08-05 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Set Clipboard to New Color Image Using KM Action via Script [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.


3 Likes

wow, you are truly a KM & AppleScript magician :mage:‍♂

1 Like

Thank you so much! I didn't realize you could just type variable names in dimensions. This is SUPER useful! Thanks JMichaelTX and gglick

2 Likes