Filling Out Forms on macOS and Windows
Secret Agent is a helper application which runs along side Codebook on macOS and Windows. It allows you to quickly access and insert your Codebook data into other applications and browsers using a global keyboard shortcut, without bringing up the main Codebook window. Secret Agent is not available on iOS and Android.
Adjust the Secret Agent Keybinding to your liking, or just leave it as the default.
Default hotkey combinations:
The simplest means of copying a password into another app is to activate the Secret Agent window, look up the password you need, and insert it into the active text field.
Run Default Action uses fields from Codebook to populate fields on a form. You access Secret Agent the same way, using the hotkeys. Select the desired Codebook Entry and then press the Play button or (or Command + R in macOS and Control + R in Windows). The username/email and password fields will be inserted followed by enter/submit in the active application. (To enter a single field value, you press the enter key – see above.) It attempts to run a default action using the username/email and password fields from the entry and inserting them into the active application.
Note: Codebook first looks to see if you have a Secret Agent Action field on the entry (see below). If you do, that will be run instead.
Custom Secret Agent Action allows you to perform one action to insert multiple data values. You can customized which fields in an Entry will be inserted into the active application. To make this feature more useful, you can also include commands between data values (tab, enter, space and wait). This is demonstrated in the sample video below whichs allows enters values into a two screen login process.
In this example, we're logging into Dropbox with 2 factor authentication enabled. The custom Secret Agent Action is:
#[email]<tab>#[password]<enter><wait3>#[totp]<enter>. It's associated with this Secret Agent Action suggestion:
Page 1: Email & Password, Page2: TOTP (See Helpful Tips and Suggestions for more information.)
Creating your own Secret Agent Action involves two steps:
Custom Secret Agent actions must be setup/defined in a field with Mode of Secret Agent Action.
File -> Customize Labels. Add a new label, name it whatever you'd like (e.g. "Quick Fill"), and set the 'Mode' to "Secret Agent Action".
Note: new installations should have a "Secret Agent Action" field already installed by default.
Open an existing entry or create a new entry. Add a field, and set the label to the "Quick Fill" label you just created. Start typing in the field, you'll notice a list of suggestions shows up in a small table underneath. You can arrow down or up (or click) to cycle through the suggestions to see what their representative commands are. Once you find one that you'll think will be suitable for the site or form you're trying to fill, hit enter, and save the entry.
Go to a website or form that you'd like to fill in, click in the first field that you'd like to fill and call Secret Agent using it's defined key combination. Search for the appropriate entry (in our example "New Entry") and arrow down to the Secret Agent Action field ("Quick Fill" in our example), hit enter and the command sequence will be activated. In our example, it will fill the username ("MyUsername"), tab, fill the password ("@=wX[7qp,rceZ7"dH"), and hit enter to sign in.
We recommend filling the target form once manually (without using the mouse) to determine what commands are necessary. As you're filling it, note which keys you're using to navigate between fields and submit the form. This should directly parallel with the available commands:
<waitN> (where N is the number of seconds to wait)
<space> (we've found this one handy for toggling those "Remember me" check boxes).
We've pre-populated the Secret Agent Action suggestions table with, what we believe to be, the most common scenarios. The available suggestions are:
Username & Password Email & Password Page 1: Username, Page 2: Password Page 1: Email, Page 2: Password Page 1: Password, Page 2: TOTP Page 1: Username & Password, Page 2: TOTP Page 1: Email & Password, Page2: TOTP Page 1: Username, Page 2: Password, Page 3: TOTP Page 1: Email, Page 2: Password, Page 3: TOTP
The scripts themselves actually look like this, and you’ll see these displayed as the Command field’s value once selected:
#[username]<tab>#[password]<enter> #[email]<tab>#[password]<enter> #[username]<enter><wait2>#[password]<enter> #[email]<enter><wait2>#[password]<enter> #[password]<enter><wait2>#[totp]<enter> #[username]<tab>#[password]<enter><wait3>#[totp]<enter> #[email]<tab>#[password]<enter><wait3>#[totp]<enter> #[username]<enter><wait2>#[password]<enter><wait3>#[totp]<enter> #[email]<enter><wait2>#[password]<enter><wait3>#[totp]<enter>
As the syntax suggests, you can enter your own command matching your own custom label names, for instance:
The <waitN> command is useful after <enter> when you have to fill out multiple forms in succession, and need to allow time for the next form to load. As always, if you have questions, suggestions or feedback, please let us know at email@example.com.
If you are having trouble enabling or using Secret Agent to insert your passwords in other apps we have a troubleshooting document available listing known issues and work-arounds. And as always, feel free to contact us directly for help.