Use the Enter Password Dialog as Trigger?

I would like to use the presence of an enter password window to trigger a macro. None or the existing triggers seem to work. Any ideas?

Not really, no.

1 Like

Auto-filling every password dialog that pops up, regardless of context, is "A Bad Idea". Luckily, there isn't a trigger for it!

If the authentication request is coming up as a result of actions you are taking in the macro then that's a different matter -- you know the context, so it's less risky. What are you doing that's bringing up the prompt? There may be another solution, eg a Unix command that you can specifically allow via sudoers.

@GregT You can use an if-then action and a screenshot to pause your macro until the password input field appears.

I use this for all apps that require a password entry.

Here is an example of how I unlock TabForms app with 1Password. As you can see, no password is saved in the KM macro:


If you don't use 1Passowrd, it would also be possible with a KM macro and the macOS keychain.

In this video, an example of how to combine the KM macro with a Siri shortcut:

I'm not using KM to enter anything. I just want the password window's password entry field to be ready for typing.

So take a step back -- why is that dialog appearing? Could you use that "why" as a trigger, is there some way to catch the event that's prompting the dialog, could you macro the previous actions so you know, and can wait for and detect, the dialog?

An "enter password window" could be many things. Is this an OS dialog (eg for authenticating to System Preferences/Settings), an app dialog, something else? Does the dialog always appear the same or are you after a more generic "any password window" solution?

Even if you end up with a "scrape my screen every second looking for this image", restricting the area that needs to be checked can make a huge difference in the impact to your system.

1 Like

Hey Greg,

What password window? The macOS password dialog – or something else?

Usually when these pop up they have focus, so why doesn't yours?