browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Kuwait Numbering Plan changer for Mac :) – Updated 23-09-2008

Posted by on September 20, 2008

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 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.

38 Responses to Kuwait Numbering Plan changer for Mac :) – Updated 23-09-2008

  1. Mac User


    This is perfect, not to mention very easy!

    I think its the best solution out there for Mac Users.

  2. mjkout

    Mac User: you are most welcome hope you enjoy it.

  3. Moey

    thanks a lot πŸ™‚

  4. fkj

    thats awesome man, thanks alot

  5. mike

    thanx mate..saved me ALOT of time;p

  6. mjkout

    you are welcome guys, as they say need is the mother of all inventions πŸ˜›

  7. kr

    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

  8. mjkout

    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

  9. qubi

    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!)


  10. mjkout

    qubi : You triple rock for being a mac user πŸ˜‰

  11. R

    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

  12. mjkout

    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

  13. PaLoMiNo

    THANK YOU πŸ™‚

  14. hanan

    Thanks πŸ™‚
    You’re a life-savor

  15. mjkout

    PaLoMiNo & hanan : you are most welcome πŸ˜€

  16. shurouq

    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 :/

  17. kr

    hi thanks for the answer, is + considered a degit in your code

  18. mjkout

    its either stored as Text or a string field

  19. khaled

    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

  20. mjkout

    Khaled : you are most welcome i’m glad to help fellow Apple users anytime πŸ˜€

  21. MrENG

    “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.


    +965-9876-5432 , 00965-9876-5432 should not be changed.

    Thanks πŸ™‚

  22. mjkout

    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

  23. MrENG

    mjkout: So for the following example:

    1- +965YYYYYYY
    2- +965XYYYYYYY
    3- +965YYYYYYY

    Will it skip entry #2 as it already been fixed before?

  24. mjkout

    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

  25. mjkout

    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 )

  26. MrENG

    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.

  27. MJKOUT

    MrENG: thank you for your valuable comments, couldn’t have done it without the positive feedback i get from you guys

  28. mjkout

    shrouq: mine is SE too which model is yours ?
    P.S: sorry for the delay but the spam filter is acting crazy..

  29. Sara

    Ji3la ib mezan a3malik enshalh, very helpful, jzak alh alf khair

  30. MJKOUT

    Sara: Thanx alot sis ajma3een inshallah πŸ™‚

  31. Stuck

    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.

  32. mjkout

    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

  33. Stuck

    Thanks Bro!

  34. el7umin

    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

  35. Hamad

    thanks for the script but I’m having the same problem with US numbers!!

  36. mjkout

    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.

  37. LAVERNEBuckley

    It is good that people can get the business loans moreover, that opens up completely new possibilities.

Leave a Reply

Your email address will not be published. Required fields are marked *