Re: [AS] au Sujet du carnet d'adresse

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jean-Paul Danain
Date:  
À: La liste AppleScript Francophone
Nouveaux-sujets: [AS] Scripter Mail
Sujet: Re: [AS] au Sujet du carnet d'adresse
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
> Applescript_fr@???
> http://listes.patpro.net/mailman/listinfo/applescript_fr


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