System Preferences - Security & Privacy - KM hangs or aborts after Credentials entered

KM newbie.
KM macro opens Dialog to accept Username and Password typed in by user (to keep this simple to start with). I once succeeded using a Pause_Until_Return_Key_pressed, but deleted this macro. Now all attempts appear to abort / hang ?? after lock is opened. No subsequent actions are executed. What am I missing?? Thanks

Hi @Kiwivideo, the problem might be that you need to re-enable the input window (password) before pasting.

Could you post his macro/screenshot here so that one can better analyze the problem?

I use the following KM macros to unlock:

(1) via the macOS keychain

TestMac <B61D 201230T133011>

(2) via 1Password

Since learning shortcuts is not my thing, I use a BetterTouchTool gesture as a trigger.

1 Like

Hi @appleianer.

Many thanks for your reply. Very useful to have these macros. I will use one of them later.

My current problem is slightly different, though. I CAN enter the password, and macOS DOES unlock the lock. (I do this merely by typing in the password manually, directly on the computer running the macro. Simple, but that's all I need at the moment.) It's what happens AFTER that, that is the problem. Basically NOTHING happens! The next line of the macro is never executed, no matter WHAT that next line in the macro is. For simplicity, I have used a "Prompt the user for input", just to display a dialog on screen - even as a visible "comment"
to indicate that execution has passed back to the macro.

Is there a specific process I have to invoke to pass control back to the macro??

The macro, with extra actions at the end of it for testing purposes, is as follows. I DO see the first dialog (Prompt the user for input), but I never get as far as seeing the SECOND dialog. Also, the debugger never receives any more lines of code. It never pauses again if I use it to step through each line of code, one line at a time.

Incidentally, how did you grab the lines of your macros, so you could paste them here?

Debugger Start
Activate System Preferences
Execute AppleScript
Prompt for User Input “Progress Dialog 1”
Debugger Breakpoint This Macro
Open Security & Privacy Preference Pane
Debugger Breakpoint This Macro
Pause for 2.0 Seconds
Press Button “Click the lock to make changes.”
Pause for 10 Seconds
Prompt for User Input “Progress Dialog 2”

@Kiwivideo here is a macro from user @Tom,which I use to export a macro and its screenshot:

Please select the macro (here blue) and then start the export macro. You still have to choose the trigger (shortcut etc.).
Afterwards you can simply drag and drop the macro and the screenshot into your post.

Export Macro : Image <1537 201231T133040>.kmmacros (46,4 KB)

If you want to use these macros, please let me know. I will send them to you with an explanation of the individual actions.

I also have a macro to do this, but it can easily be done using the tools built-in to the KM Editor:
See How to upload your macro -- KM Wiki

Many thanks for your macros, and tips on recording and uploading macros!

1 Like