
As many of you already noticed mobile companies started with the new numbering plan,
on a previous post i created a csv file converter to change any number in a file to the new numbering scheme,
just now i finished creating an Apple script to update the AddressBook entries smoothly.
the script will do the following :
check for +965 , 00965 , 965 ( longer than 7 ) numbers
add the correct prefix based on the moc plan to each number
add +965 to Kuwiaiti numbers modified without having +965 previously.
To you use this script it is recommended to backup your AddressBook by opening the AddressBook.app then File > Export > Address Book Archive.
Note :if you are using iSync to sync your mobile its recommended to sync before the backup then after you convert reset the device from iSync menu to prevent numberless contacts.
Download This Script and execute the script and it will go through your address book change the records according to plan.
Please feel free to drop any comments/suggestions
UPDATE : N. has made one for Windows check it out Here
Downloads/source & Change Log:
Version : 1.2 (recommended for partially edited address book by user AKA falantan )
1.2 source file
Description: Now checks and updates numbers manually edited by user ( i.e. 8 digit numbers 9xxxxxxx or 6xxxxxxx or 2xxxxxxx )
Version : 1.1
1.1 source file
Description: modified code to get rid of redundant if statements, should run a bit faster now.
Thanks!
This is perfect, not to mention very easy!
I think its the best solution out there for Mac Users.
Mac User: you are most welcome hope you enjoy it.
[...] For Mac users the blogger Q8i has created an Apple script that will also convert all your numbers to the correct format. You can download his script from his blog [Here] [...]
thanks a lot
thats awesome man, thanks alot
thanx mate..saved me ALOT of time;p
you are welcome guys, as they say need is the mother of all inventions
thanks of the effort, but what will it do to non kuwaiti numbers, how does it identify kuwaiti numbers if they don’t have a 965 infront of them
kr: first it checks the length of the number if its 6 or 7 digits ( kuwait mobile / home / 800 numbers ) then it applies the rule
next if the length is more than 7 & it starts with ( 00965 or 965 or +965 ) then it applies the rule
otherwise it will be skipped.
the rule then checks if the number falls within the range MOC provided and applies the corresponding digit
Man, Thank you so much.. I was dreading the notion of manually reprogramming all my numbers. You rock.. (and because you did this for MAC, you double ROCK!)
cheers
qubi : You triple rock for being a mac user
Thx u so much,
but when i sync the number again to my iphone all of the kuwaity numbers are with the code 00965 so i still i cant see the name, i mean u scpt worked very well and its add the code to my numbers so what i can see now 8 digits number calling me without any name
any help plz.
THX U
R : on the address book do you see them in the correct format ?
also check the address book in your iphone does it have duplicate numbers / names?
if it didn’t work try the iPhone version on http://www.bojacob.net
THANK YOU
Thanks
You’re a life-savor
PaLoMiNo & hanan : you are most welcome
Walla inta fannan! But my problem is that isync won’t connect to my sony ericsson. Plugins don’t work and i feel technically challenged :/
hi thanks for the answer, is + considered a degit in your code
its either stored as Text or a string field
man you cant imagine how easy you made that task. God bless you, you are a life saver, imagine, in our company we are a 100% apple environment, and we were really worried about how time consuming this issue will be.
thanks man, i really cant thank you enough
Khaled : you are most welcome i’m glad to help fellow Apple users anytime
“kr: first it checks the length of the number if its 6 or 7 digits ( kuwait mobile / home / 800 numbers ) then it applies the rule
next if the length is more than 7 & it starts with ( 00965 or 965 or +965 ) then it applies the rule
otherwise it will be skipped.
the rule then checks if the number falls within the range MOC provided and applies the corresponding digit”
You may want to consider one more if statement:
if it’s longer than 7 digits, starts with [(00/+)965] and it’s between 10-12 (13? depends on what is + considered) digits, then apply the rule, else skip.
This way, if someone already added the 8th digit for some of the entries before applying the script, and there is a 00/+965 before that, then NO 8th digit should be added.
i.e:
+965-9876-5432 , 00965-9876-5432 should not be changed.
Thanks
MrENG: it checks the numbers that start with ” 00965 , +965 , 965 ) and takes the last 7 digits and reformat them to be all as +965XYYYYYYY where X is the required digit and YYYYYYY is the original number.
so thats why it goes over each number again
mjkout: So for the following example:
1- +965YYYYYYY
2- +965XYYYYYYY
3- +965YYYYYYY
Will it skip entry #2 as it already been fixed before?
it will process it like all >7 numbers but the result will remain the same as it splits the +965X part and works only with the YYYYYYY part
so if you run it again you won’t get +965XXYYYYYYY next time
MrENG: there is a new version now 1.2 for users who already changed some of their numbers now it will reformat them ( from Xyyyyyyy to +965Xyyyyyyy )
Excellent
This work is really appreciated. Thank you. I wish I heard about this script before I changed my contacts manually :p I just wanted you to perfect it for all others to benefit.
MrENG: thank you for your valuable comments, couldn’t have done it without the positive feedback i get from you guys
shrouq: mine is SE too which model is yours ?
P.S: sorry for the delay but the spam filter is acting crazy..
Ji3la ib mezan a3malik enshalh, very helpful, jzak alh alf khair
Sara: Thanx alot sis ajma3een inshallah
Dude thanks for this script. My only problem is that i do not know how to run the script. I have all my contacts in my Addressbook, but i do not know how to run the script. Is there a special way to run it ? or do i just click on “Run” ? I clicked on run and it does nothing.
actually its working but to see the results before clicking run there is a small tab on the bottom named results click it then click run and you see it all
Thanks Bro!
Thxx a lot for this lovely program!!
bas fee moshikla ba9ee6a, im in the US and the program added +965 to my USA contacts! so it edited my Kuwaiti contacts PERFECTLY but it edited my USA contacts that do not have +1 at the beginning. BTW USA numbers that were edited are 10 digit numbers.
thanks again for the great program
thanks for the script but I’m having the same problem with US numbers!!
this script was made only for Kuwait numbers and will ignore any number longer than 7 digits and doesn’t start with 965 you can modify the script to look for the US numbers and either change them or ignore them.
It is good that people can get the business loans moreover, that opens up completely new possibilities.