Is there a way to trigger a macro when Finder opens a server login dialog?
It's my local file server, but it runs on Windows with a Microsoft Account login (email address and password), which Finder won't save properly in the keychain. Thus, I have to enter the complete login info each time I connect to the server. I have a hotkey trigger for KM to do that for me, but I'd like an automatic way without having a periodic trigger and If Found Image check running.
If you mean "is there a built in KM trigger," then I'm thinking the answer is (probably) no.
If you mean "can we write a KM macro that detects this image and takes action" then the answer is probably yes, but you may not like the answer. I see your image has a set of blue human triplets in it. That should be pretty easy for KM's Find Image action to spot. So why not create a KM macro that uses a periodic trigger of say, 10 seconds, to look for that blue image (include some of the dark grey around it for best results). If it sees the image (you can narrow the search area to a specific area to improve performance) then it will execute whatever actions you want.
However I'm not a big fan of including passwords in KM macros. It's a risk that you need to understand. I think it's better to research why Keychain isn't working and find a way to make it work.
I've found that this sort of use-case is best served by a macro with a Focused Window trigger. Restrict it to a Finder-only macro group, and it should serve your needs just fine with a minimum of CPU impact and resource usage.