J'ai la solution !!!
Tu peux utiliser un script applescript pour exporter les vCards sur ton téléphone.
Le script exporte les vCards des personnes sélectionnés dans le "Carnet d'adresses "
Tu ouvres l'application "Éditeur de script" qui est dans le dossier "/Applications/AppleScript/" , tu colles le code dans la fenêtre et tu cliques sur le bouton "Exécuter".
CODE :
global dossier_dest
set dossier_dest to choose folder with prompt "Choisissez le dossier pour l'exportation des vCard" default location (path to startup disk)
set vcard_err to {}
tell application "Address Book"
repeat with i in (get selection)
set leNom to name of i
if leNom contains ":" then set leNom to my delchar(leNom)
set F to my checkDuplicate(leNom)
try
set Fich to open for access F with write permission
write (vcard of i as Unicode text) to Fich starting at 0
close access Fich
on error
set end of vcard_err to (name of i & return)
try
close access Fich
end try
end try
end repeat
end tell
if vcard_err is {} then
display dialog "L'exportation des vCards est complétée." buttons "Ok" giving up after 3
else
display dialog "Les vCards de ces personnes n'ont pu être exportés." & return & (vcard_err as string)
end if
on delchar(t)
set {olddelims, text item delimiters} to {text item delimiters, ":"}
set t to text items of t
set text item delimiters to "/"
set t to (t) as string
set text item delimiters to olddelims
return t
end delchar
on checkDuplicate(n)
set {s, nbr} to {n, 1}
tell application "Finder" to tell folder dossier_dest
repeat while exists file (s & ".vcf")
set s to n & " " & nbr
set nbr to nbr + 1
end repeat
return (make new file at it with properties {name
s & ".vcf")}) as string
end tell
end checkDuplicate
VOILA
Ca fonctionne nickel !
Tu peux utiliser un script applescript pour exporter les vCards sur ton téléphone.
Le script exporte les vCards des personnes sélectionnés dans le "Carnet d'adresses "
Tu ouvres l'application "Éditeur de script" qui est dans le dossier "/Applications/AppleScript/" , tu colles le code dans la fenêtre et tu cliques sur le bouton "Exécuter".
CODE :
global dossier_dest
set dossier_dest to choose folder with prompt "Choisissez le dossier pour l'exportation des vCard" default location (path to startup disk)
set vcard_err to {}
tell application "Address Book"
repeat with i in (get selection)
set leNom to name of i
if leNom contains ":" then set leNom to my delchar(leNom)
set F to my checkDuplicate(leNom)
try
set Fich to open for access F with write permission
write (vcard of i as Unicode text) to Fich starting at 0
close access Fich
on error
set end of vcard_err to (name of i & return)
try
close access Fich
end try
end try
end repeat
end tell
if vcard_err is {} then
display dialog "L'exportation des vCards est complétée." buttons "Ok" giving up after 3
else
display dialog "Les vCards de ces personnes n'ont pu être exportés." & return & (vcard_err as string)
end if
on delchar(t)
set {olddelims, text item delimiters} to {text item delimiters, ":"}
set t to text items of t
set text item delimiters to "/"
set t to (t) as string
set text item delimiters to olddelims
return t
end delchar
on checkDuplicate(n)
set {s, nbr} to {n, 1}
tell application "Finder" to tell folder dossier_dest
repeat while exists file (s & ".vcf")
set s to n & " " & nbr
set nbr to nbr + 1
end repeat
return (make new file at it with properties {name
end tell
end checkDuplicate
VOILA
Ca fonctionne nickel !