Custom Icon Manager

For sure. I use icons in folders a lot. I don't use them more, because of the workflow, but now everything is about to change :wink:
Thanks again!

1 Like

@noisneil

I noticed an issue with the macro where you have an action with your personal finder path:

image

What's in this file and shouldn't the path be set to a variable that we can modify in the beginning of the macro?
And wouldn't it be good if the macro checks if there's a file in that location we define with that variable, and if there's no file, it creates it?

Another thing, based on advice that other users gave me here on the forum, is that I've been changing my Shell and AppleScript to only contain the variables used by the script, instead of using the option "Include All Variables":

image

I keep getting the message:
Variable XYZ excluded from environment to ensure the environment is not too large
so now I'm going back to the macros that cause that and update them to just include the variables I'm using.
Not sure if you want/need to do that as well, but it's just a small detail in case you think it's worth the time to update the macros.

Just switch it from Script file to text script and you can edit it if need be.

I'm not sure what you mean. The variables are set explicitly, so only those variables are used.

It's a call-back to this thread and the potential problems (more likely, unimportant error messages in the log) for people with "large" global variables.

2 Likes

I've moved mostly away from creating custom icons with the occational exception of using text where a graphic doesn't work, so two requests.

  1. Have option to type text as an icon. Auto resize to max size to fit of course :wink:.

  2. Have SF Symbols as source to pick from.

Thanks for making it clearer

Small tweak, if you're interested:
This was something I had to figure out for one of those "apps" I'm creating for SPITE and I noticed that the Icon Manager "suffers" from the same thing. When you type something in the search field, it always tries to check the spelling:
SCR-20240715-kshq

This to me is sometimes annoying, in certain scenarios, this one being on of those cases.
So if you just add spellcheck="false" to the <input> you get this:
SCR-20240715-kson

which to me is less intrusive. Maybe that's just me, but decided to share it anyway in case you think it's a good tweak. So you end up with this:

SCR-20240715-ksrz

1 Like

Good shout. I'll change it in the OP.

1 Like

Just checked and I'm not seeing auto-correct, as I've disabled it in System Settings. Nevertheless, I've done as you suggested and updated the macro above.

1 Like

For some stuff I find it useful, but sometimes it gets on my nerves :joy:

Neil, I noticed that on the version you provided for Finder, when I try to create an icon with the same name as one already in the folder, I don't get this window:

image

and when I go to the Engine.log I see this:
2024-08-18 20:25:35 Assertion Failed: tempScriptHolder.shellCommand, file: …/Source/Actions/AExecuteRootScript.mm:48, value: 0
2024-08-18 20:25:35 Execute AppleScript Exception
2024-08-18 20:25:35 Action 16014803 failed: Execute an AppleScript failed with script error: Execute AppleScript Exception

Do you know what's happening and how to fix it?
Thanks

Icon Manager - Finder Version.kmmacros (83.9 KB)

Check that the AppleScript action isn't referencing a script file (that you don't have). If it is, change it to a text script.

1 Like

That was the issue, yes. Thanks! :slight_smile:

1 Like

Updated to replace a referenced AppleScript file with a text script. Good catch, @alltiagocom!

1 Like

Always here to help, one tweak and report at a time :wink:

@noisneil I'm having an issue with the macro. I hit the shortcut and it seemed like it wasn't working, because the pane didn't pop up so I hit the shortcut to cancel all macros, but in between my brain thinking about it and me hitting the shortcut, part of the pane popped up, but my fingers were already programmed to cancel all macros. Now I'm stuck with this in the middle of my screen:

image

No matter what I do, it doesn't go away. Hitting Escape, doesn't work. Right clicking to see if there's any other options, doesn't show anything. Clicking one of the empty boxes doesn't do anything. Clicking outside the pane, doesn't work. It seems like I need to restart my computer.

Maybe you find out what could cause this and fix it, I don't know. Just wanted to share this issue.

Have you tried cancelling all macros again? That should get rid of the prompt. If not, then you can try restarting the KM Engine.

tell application "Keyboard Maestro Engine" to reload

Failing that, it's restart time.

In terms of the icons being missing, have you moved your icon folder?

Yes, but after the first time I cancelled them, there were no more macros running, so that didn't work.

It only showed the icons were missing, because it "crashed". After I restarted the computer it's back to normal.

So it seems like it crashed and then Keyboard Maestro was no longer "responsible" for it being on screen, does it make sense? So it was something in the system that kept the window open, even after KM was no longer running any macro. Maybe it was a glitch, but decided to report it anyway, in case there's something in the macro that could potentially let this kind of thing "slide".

I'm inclined to believe this is a KM thing more than a macro thing, so if it happens again, let me know and it might be worth asking Peter about it.

I will add that I've never had that happen with the HTML Prompt, so it may just be an isolated glitch, as you said.

Yes, @DanThomas bumped into this last month:

So if it happens again, fire up Activity Monitor, have a search for that, and kill it.

1 Like