Mettre en Majuscule

phcm64100

Membre actif
Bonjour

j y connais rien en AppleScript

j ai trouvé celui ci qui est censé mettre les noms de mon carnet d adresses en majuscule, je le met dans l outil je fais executé, il me dit OK mais les nom sont toujours pas en majuscule. le scipt date de 2006


merci de votre aid


property lower_alphabet : "abcdefghijklmnopqrstuvwxyzáàâäãåçéèêëíìîïñóòôöõúùûü"
property upper_alphabet : "ABCDEFGHIJKLMNOPQRSTUVWXYZÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜ"

tell application "Address Book"
repeat with thisPerson in (get people whose last name is not missing value)
tell thisPerson to set last name to my change_case(last name)
end repeat
end tell


on change_case(t)
set C to characters of t
considering case
repeat with i in C
tell (the offset of i in lower_alphabet) to if it > 0 then set contents of i to character it of upper_alphabet
end repeat
end considering
return C as string
end change_case