Extracting members of an address book group

Can someone give me the correct syntax, for extracting the members of a particular group? TIA.


tell application "Address Book"
	repeat with a_group in (get name of groups)
		set group_members to <what goes here?>
	end repeat
end tell

Also, as an aside, I recall seeing once a construct for getting the path for the user’s home directory. However, I cannot seem to find that again. How do I build a path using that construct? TIA, again.


set my_documents to <what goes here?> & ":Documents"

Here is a short piece of code to get the email addresses of every person in a user selected group, which should satisfy your first query:

tell application "Address Book"
	set gp_list to the name of every group
	set a to the value of email of every person in group (item 1 of (choose from list gp_list))
end tell

The path to command has a list of accessible folders in the StandardAdditions dictionary, of which this is the one I believe you are looking for:

set a to path to home folder as Unicode text