der austausch einer 9 gegen eine 3 im script sollte dich hoffentlich nicht überfordern
das ist alles ?
statt:
set _newCountry to "Deutschland"
set _prefix to "+49"
tell application "Address Book"
repeat with thisPerson in every person --of group "all"
set _count to count address of thisPerson
repeat with x from 1 to _count
set _country to ¬
country of address x of first item of thisPerson
if _country is missing value then ¬
set country of address x ¬
of first item of thisPerson to _newCountry
end repeat
set _count to count phone of thisPerson
repeat with x from 1 to _count
set _phone to ¬
value of phone x of first item of thisPerson
if character 1 in _phone is not "+" then
if _prefix is not in _phone then
if character 1 of _phone is "0" then ¬
set _phone to characters 2 ¬
through end in _phone
set _number to _prefix & _phone
set value of phone x ¬
of first item of thisPerson to _number
end if
end if
end repeat
end repeat
end tell
einfach:
set _newCountry to "
Österreich"
set _prefix to "
+43"
tell application "Address Book"
repeat with thisPerson in every person --of group "all"
set _count to count address of thisPerson
repeat with x from 1 to _count
set _country to ¬
country of address x of first item of thisPerson
if _country is missing value then ¬
set country of address x ¬
of first item of thisPerson to _newCountry
end repeat
set _count to count phone of thisPerson
repeat with x from 1 to _count
set _phone to ¬
value of phone x of first item of thisPerson
if character 1 in _phone is not "+" then
if _prefix is not in _phone then
if character 1 of _phone is "0" then ¬
set _phone to characters 2 ¬
through end in _phone
set _number to _prefix & _phone
set value of phone x ¬
of first item of thisPerson to _number
end if
end if
end repeat
end repeat
end tell