[?]   dans   mode   trier par   

[<] Sujet : [AS] au Sujet du carnet d'adresse
De : Yves CiBERT <anonyme@...>
Date : 2010-02-27 17:14:25

Sujet : Re: [AS] au Sujet du carnet d'adresse
De : Jean-Paul Danain <anonyme@...>
Date : 2010-03-01 13:32:42

Bonjour !

On peut aussi créer le groupe si celui-ci n'existe pas :

		if exists group monGroupe then
			add newEntry to group monGroupe
		else
			make new group with properties {name: monGroupe}
			add newEntry to group monGroupe
		end if

Cordialement,
JPaul




Le 28 févr. 10 à 13:56, Yves Petronin a écrit :

> --SCRIPT
>
> --Le groupe NOM DU GROUPE doit exister. On peut envisager  un test  
> préalable avec set Listegroupes to  name of groups
>
> tell application "Address Book"
> 	set thePerson to make new person with properties {first  
> name:"James", last name:"Bond"}
> 	save addressbook
> 	add thePerson to group "NOM DU GROUPE"
> 	save addressbook
> remove (every person whose last name is "Bond") from group "NOM DU  
> GROUPE"
> end tell
> --SCRIPT
>
> On peut créer directement une personne dans un groupe comme suit:
>
> --SCRIPT
> tell application "Address Book"
> 	tell group "NOM DU GROUPE" to make new person with properties  
> {first name:"James", last name: "Bond",}
> 		save addressbook
> end tell
> --SCRIPT
>
>
> --Note: non teste en 10.6
> _______________________________________________
> Applescript_fr mailing list
> anonyme@...
> http://listes.patpro.net/mailman/listinfo/applescript_fr

_______________________________________________
Applescript_fr mailing list
anonyme@...
http://listes.patpro.net/mailman/listinfo/applescript_fr

Apple, AppleScript, AppleScript Studio, AppleTalk, AppleWorks, ColorSync, Finder, HyperCard, iBook, iLife, iMac, iWork, Keynote, Mac, Macintosh, Mac OS, Pages, Panther, PowerBook, Power Mac, Power Macintosh, QuickTime, Safari, Tiger, Xcode sont des marques déposées par Apple Computer, Inc., enregistrées aux Etats-Unis et dans les autres pays. Liste officielle