“Insert a Colored Comment” Macro

This is a corrected version of a macro I first posted at How click gear of an action?. I believe it correctly solves the problem of clicking the gear of a newly inserted comment.

Insert a Colored Comment.kmmacros (52 KB)

Peter show us how to do this long ago. As long as the action is selected or the mouse is over a non-field area, this will work, and does not rely on found image:

MACRO: Set Color of KM Action

But now that Dan has published his MACRO: [KMFAM] Favorite Actions and Macros, I have little need for it. I have already put my colored "ReleaseNotes" Comment in my Fav Action list.

What I need this for is to insert a new comment of a specified color as part of another macro. Therefore, I need to be able to set the color regardless of the mouse position and the selection, as I explained several times in the original discussion:

== 1 ==
== 2 ==
== 3 ==
== 4 ==

Mitchell - I recommend using a Named Clipboard. Then you already have all the options set.

If you haven’t already, see my short tutorial:

2 Likes

Good idea. I started heading down that direction but abandoned it and never carried it forward. I don’t remember why. I think it was because I was trying to make it a general tool and decided it was too unwieldy.

Pasting the pre-formatted clipboard makes clicking the gear unnecessary, but it doesn’t put the cursor into the comment title or body. I still don’t see anyway to do that without clicking relative to a found image. Pasting a colored comment really complicates things because the found image I was using was a part of the upper left of the comment, but after pasting a colored comment that area would have a color, so I’d need a different click relative to the image for each color. (Not a huge problem as long as there is only a small fixed set of colors.) What I do in my paste a colored comment macro is click relative to the upper left image to get into the heading, save the mouse position, click the gear, color the action, then go back to the mouse position so the cursor is positioned in the title.

Pasting the pre-formatted clipboard makes clicking the gear unnecessary, but it doesn't put the cursor into the comment title or body.

Are you sure? It does for me. It puts the cursor in the title.

Thank you!