Set All Contacts in Lion

So not only did Lion change Address Book’s appearance negatively it also seems to have screwed up a bunch of scripts.

It used to be that to select the “All Contacts” group you could use various tricks. The one I used was “set selection to my card”. However that no longer works and neither did any of the other tricks I tried.

Anyone know how to specify the “All Contacts” group? I’m trying something like the following:


tell application "Address Book"
	activate
	set selection to my card
	set selection to first person whose first name = "Brent"
end tell

Try it when you have a different group selected and watch it not work.

Think I found a solution. Card only view (cmd-2) apparently also sets All Contact view. So use GUI scripting for this first.