[SOLVED] select/edit person in Address Book
[SOLVED] select/edit person in Address Book
- Subject: [SOLVED] select/edit person in Address Book
- From: Fred Zuijdendorp <email@hidden>
- Date: Tue, 2 Mar 2004 18:53:39 +0100
Thanks Karl, you gave me the winning tip.
In AppleScript, this was the solution:
tell application "Address Book"
set g1 to first item of groups
set p1 to first item of people of g1
set i to id of p1
tell me to open location "addressbook://" & i & "?edit"
end tell
In Cocoa, this works:
ABPerson* contact = (ABPerson*)selection;
NSString* uid = [contact uniqueId];
NSURL* url = [NSURL URLWithString:[NSString
stringWithFormat:@"addressbook://%@?edit", uid]];
[[NSWorkspace sharedWorkspace] openURL:url];
Relieved I am.
- fred
On 02 mrt 2004, at 17:46, Karl Kuehn wrote:
You can always use lanuch services:
http://www.macosxhints.com/article.php?story=20030214071907803
In the comments there is the hint:
addressbook://a-long-and-ugly-hex-id-code:ABPerson?edit
Karl Kuehn
email@hidden
On Mar 2, 2004, at 10:53 AM, Fred Zuijdendorp wrote:
After checking the dictionary and other sources I'm beginning to
wonder:
Is it at all possible to tell Address Book, from a script, to show a
person's card?
Or even better: to show the card in edit mode?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.