Feature Request: User Presets in Icon Chooser

Thanks Chris. It was next on my to-do list.

Your suggestion will only work if the icon image well is visible, so I've opted for selecting the current macro in the groups list and then tabbing. Here's a new version with that included:

Custom Macro Icons.kmmacros (72 KB)

Macro screenshot

I also added:

  • AppleScript Dialogs instead of KM Prompts (to display icon previews more neatly):

  • New Icon from application icon or image file.
  • The user can now use the arrow keys in the Icon Chooser to select an Icon and hit ↵ to submit.
  • Icons resized to 64x64 pixels.

One thing I couldn't figure out was why I couldn't use KM's Set System Clipboard to Image action and had to resort to AS. If I do use the native action, I can display the image (Display System Clipboard) so it is on there; it just won't paste.

1 Like

Just tried your macro and the custom HTML prompt displays this for me:

2023-10-29_11-29-12

The Local__IconList variable contains the list of the 24 icon image files you provided for testing.

Any thoughts on what might be going wrong?

(BTW I've had to roll back to KM 10.2 in case that makes a difference.)

Oh no! I wonder if it's failing for @cdthomer, @rolian or @VicFirth ?

What happens if you click one of the black icon squares? Does it still paste the icon? If so, then it's just an issue with the HTML prompt not displaying the images.

(I say "just" but I'm not sure how I'd investigate it!)

I notice the squares aren't actually square either. Hmm...

Well I guess I didn’t get that far along in the testing (but of course it makes sense now that I think about it). :laughing:

Thanks for those updates, looking forward to checking them out!

The original version you posted works fine for me, I haven’t had a chance to try the updated one.

1 Like

OK - I didn't try letting the macro actually do its stuff when I saw the empty grid so...

Nope it doesn't paste anything but gives me the system "bloop" noise. Looking in the log the error is:

2023-10-29 11:53:31 Custom HTML Prompt Log “value2 is null”

1 Like

I've had to go out for a bit so can't do much. Not sure I could if I were in front of my mac unless I can replicate the issue.

@cdthomer are you on KM11?

Yes, I’m on KM11 and your new version works for me without issue.

1 Like

My list of icons files looks like this:

/Volumes/Users SSD/MovedUsers/taj/Keyboard Maestro Custom Icons/BBEdit.png
/Volumes/Users SSD/MovedUsers/taj/Keyboard Maestro Custom Icons/Calendar.png
/Volumes/Users SSD/MovedUsers/taj/Keyboard Maestro Custom Icons/Dropbox.png
/Volumes/Users SSD/MovedUsers/taj/Ke...

Could that be an issue?

I can't see how. Does it work if the folder is on your Desktop?

No difference and it still fails when I use KM 11.

Hi @noisneil, this is great! Thanks for creating and sharing.

I added an icon with .svg extension and the macro stopped working. To fix this, I deleted the .svg icon. Then use KM native way of selecting an icon to the macro image well. After that, the Custom Macro Icons started working again.

Here's a site to download almost any icon possible.

1 Like

This version works fine for me.

Hopefully, this should convert any .svg, .ico or .icns files you might manually place in the Icons Folder to .png. It may not work for all files, as I'm using limited built-in macOS tools (for compatibility).

My intention was to stick with .png files, but this is probably a worthwhile addition that shouldn't slow things down too much.

Custom Macro Icons.kmmacros (75 KB)

Macro screenshot

I found what's causing the problem for me and it's spelled out in this thread:

Basically I'm stuffed because all my user files are on a removable external SSD and the Custom HTML Prompt can't load/display such files as WebKit won't allow it and there doesn't seem to be a way around it.

If I'd been aware of this limitation maybe I wouldn't have moved my user files in the first place!

1 Like

Oh dear.

I thought you said it still failed if the icon folder was on the desktop?

Well, that’s a folder in my home directory == user files!

1 Like

I have at least now seen your macro (the one in the other thread) working and it is very nice. :blush:

1 Like

For updates to this macro:

Wow this is way more than I ever expected! This is so cool! Thank you so much @noisneil

1 Like