Paste Function Not Working With Cisco AnyConnect

I’ve written a macro that changes my network location, opens 1Password to search for and copy my corporate VPN password, then opens the Cisco AnyConnect VPN client and attempts to paste the password and connect. However the macro fails on the paste action of the password copied from 1Password. I’ve also tried to use the Insert Text action that types the %CurrentClipboard%. Neither seem to work. I can manually use the Command V function in Cisco AnyConnect to paste the text copied from 1Password. Has anyone else experienced anything like this before? Any suggestions are welcome.


Rather than using 1Password for this, I would recommend storing your password in the system Keychain and accessing it using the Keyboard Maestro actions to read/write to the Keychain. See the Secure Passwords example in the Macro Library.

That will avoid interacting with 1Password, and also avoid the password being on the clipboard at all.

You can then use Insert Text by typing or pasting to insert the password into Cisco AnyConnect.

As to why the paste is not currently working, the usual causes of that would be either timing or clipboard caching, both of which can likely be avoided by not using the clipboard at all.

Thanks for your suggestion! I gave it a shot and it works like a charm. What’s odd is that I also tried the Set Variable action with 1Password and the Insert Text %Variable%Password% and it still hangs in the same place. I was thinking that the problem was with Paste action and the Cisco client, but apparently its something else since it doesn’t work with the same Insert Text action that works with Keychain.

I was originally trying to use 1Password because I log into my corporate VPN from a couple of different computers and 1Password is available on all of them. I was also apprehensive at first because I don’t like synching Keychains between them. However, with your solution I don’t have to type my 1Password master password each time and it’s a very small task to update my VPN password in three Keychains in order for it to work many times per day with a single key combination.

Thanks again!