---
title: Connecting nvALT and Address Book
date: 2012-02-02 21:11
slug: connecting-nvalt-and-address-book
categories:
- Code
tags:
- applescript
- macos
- nvalt
---

<img src="/uploads/2012/02/Johnny-Appleseed.jpg" alt="" title="Johnny Appleseed" width="300" height="199" class="alignright size-full wp-image-3616" />Here's a quick, simple AppleScript to help you hook [Notational Velocity](http://notational.net/)/[nvALT](http://brettterpstra.com/project/nvalt/) into Address Book. I sometimes want to attach a note or list of links to an entry in my address book, but I don't like using the notes field. I tend to keep _all_ of my notes[^diff] in nvALT, and I prefer not to scatter them too far. All I needed was a way to quickly create and link an nvALT note to each address...

As of recent versions, Notational Velocity and nvALT have a URL handler for nv:// (or nvalt://). Using the `/find/` parameter allows you to initiate a search in NV from a link, e.g. `nv://find/abnote%3AJohnny Appleseed`. If you use a unique prefix and full name, you can pinpoint a single note without having to create a file or locate the note's ID. The first time you click the link, it will open a search in NV, and pressing Return will create the note and begin editing. Once the note is there, it will locate it instantly the next time you click the link.

[^menu]: Enabled in AppleScript Editor, Preferences->General->Show Script menu in menubar. Or better, use [FastScripts](http://www.red-sweater.com/fastscripts/).

[^diff]: Notes, for me, are different from [log entries](http://brettterpstra.com/logging-with-day-one-geek-style/). I actually *like* keeping those separate most of the time.

I'm using the prefix "abnote:" on my notes. This AppleScript will create the URL entry automatically from the selected entries' first and last names, and you can edit the prefix in the script to be anything you like. Just save it as "Add NV Note.scpt" in `~/Library/Scripts/Applications/Address Book` and it will show up in your script menu[^menu] when you're in Address Book. You can run it on a bunch of entries (it's not optimized to run on an entire large address book, though), or one at a time as you need it.

I wrote this on Lion. I honestly have no idea if it works on anything earlier. It might[^might].

[^might]: It might not.

## The script

```applescript
tell application "Address Book"
	set thePeople to the selection
	repeat with thisPerson in thePeople
		set theName to name of thisPerson as string
		make new url at end of urls of thisPerson with properties {label:"NV Note", value:"nv://find/abnote%3A" & theName}
	end repeat
	save
end tell
```

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
