Open locked 1Password Mini with AppleScript - does not work

Options
appleianer
appleianer
Community Member
edited May 2018 in Mac

Thanks to the support I have the possibility to open the 1Password Mini with an AppleScript and also directly a certain account (here Boxcryptor) to start.

Unfortunately the call/start of the 1Password Mini does not work if it is locked.
Under 1Password 6, however, it worked perfectly with the corresponding applescript.

tell application "System Events" to tell process "1Password mini"
open location "x-onepassword-helper://search/Boxcryptor"
end tell

Does anyone know a way?


1Password Version: 7
Extension Version: Not Provided
OS Version: macOS 10.13.4
Sync Type: Not Provided

Comments

  • appleianer
    appleianer
    Community Member
    Options

    I could solve the problem with the locked 1Password Mini 7 and my macro/applescript works fine again 🤓
    A short video here in my Twitter Post

  • Jacob
    Options

    Hey @appleianer! It sounds like you got things fixed up yourself, but just to make sure, did you? :glasses:

  • appleianer
    appleianer
    Community Member
    Options

    Yes @Jacob now runs perfectly with the autofill, even with locked 1P-Mini as shown here in the video

  • Jacob
    Options

    @appleianer So glad to hear it! :blush: Let us know if you have some other questions.

  • Chris White
    Chris White
    Community Member
    Options

    Any chance you could share your solution? I'm trying to deal with the same thing now and it's hard to make out exactly what's going on in the Twitter video.

  • appleianer
    appleianer
    Community Member
    Options

    Sure you do 😉 Do you use keyboard maestro?

  • Lars
    Lars
    1Password Alumni
    Options

    @appleianer and @Chris White -- I don't want to get in the way of two of our forum members trading tips, and I'm not sure whether I understood you properly, but if you have a script that will unlock a locked 1Password mini, it would have to include your Master Password, since that's the only way to unlock 1Password when it is locked (whether the mini or in the main 1Password window). Thus, I'd be very careful about leaving your Master Password unencrypted in a script like that on your hard drive. That's definitely not recommended.

  • appleianer
    appleianer
    Community Member
    edited June 2018
    Options

    Hello, @Lars please forgive any misunderstanding.
    I would never compromise one the security of my master password for my convenience.

    If 1Password Mini is locked, the applescript pauses until I have entered my master password manually. If this is then unlocked, the password for the corresponding app on the Mac is copied with ⌘⇧ C and pasted again with ⌘V
    So the applescript does nothing else than if I, as user, would insert a password manually.

    Feel free to try this AppleScript (with 1Password Mini unlocked) to log in to your "account" in the Mac App Store:


    tell application "System Events" to tell process "1Password mini"
        open location "onepassword://extension/search/iCloud"
    end tell
    delay 1
    tell application "System Events" to tell process "1Password mini"
        keystroke "c" using {command down, shift down}
    end tell
    delay 1
    tell application "App Store" to activate
    delay 1
    tell application "System Events"
        keystroke "v" using command down
        delay 0.5
        keystroke return
    end tell
    delay 1
    tell application "Finder"
        set the clipboard to " "
    end tell
    


    It is only important to enter the correct account name in the command "onepassword://extension/search/iCloud" as in the 1Password Mini:

    Since I am not an applescript nerd, I solved the problem to open the locked 1Password Mini with the app Keyboard Maestro.
    The applescript pauses until 1Password Mini, also on an MBP with touch ID, has been manually unlocked by the user...

    If someone in your team uses the app Keyboard Maestro, I can provide the macro (screenshot).
    In the video (my tweet) an example of how it all works 😉

    I had already shown instructions (German / in this video from the minute 3:37) for 1Password Mini 6. Since the behavior of the locked 1Pasword Mini 7 has changed, I had to change the beginning of my macro (AppleScript) now.

    Please excuse the misunderstanding again.

    Greetings from Germany

  • Lars
    Lars
    1Password Alumni
    Options

    @appleianer - thanks so much for the elaboration! I use Keyboard Maestro myself, but I don't know how many others do. Some excellent work there! :)

This discussion has been closed.