Import contacts... Hack the list in?

Having issues with your magicJack? Post here, and we'll try to help you out!

Moderators: Bill Smith, Pilot

Post Reply
magicmatt
MagicJack Newbie
Posts: 5
Joined: Mon May 19, 2008 9:28 am
Location: Connecticut

Import contacts... Hack the list in?

Post by magicmatt »

Has anyone successfully hacked in a contact list to the magic jack? I have my cell phone contacts in an excell file, and formating them to match the magic Jack list and pasting them in has not worked. I am still playing around with it, in my mind it's worth it so that I don't have to type out 100 contacts since I will likely make a few mistakes that way. If anyone has had any success let me know.

MM
Darkman90808
Dan Should Pay Me
Posts: 701
Joined: Wed Feb 27, 2008 9:20 pm

Post by Darkman90808 »

Magicmatt... I believe the address list in in XML format. I haven't seen the question addressed before, but is it possible an XML editor would do the trick? I've seen "regular guys" do amazing things with HTML using nothing more than MS Notepad. I know nothing about XML, but it would be cool to be able to add entries as you suggest.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

You can hack this in Excel. Say your spreadsheet looks like this, in A1 .. B2:

Code: Select all

Jenny Lee	212-867-5309
Peggy Sue	213-234-5789
In cell C1, enter this formula:

Code: Select all

="<Respondent fullname='"&A1&"' phonenumber='"&B1&"' />"
Copy the formula down column C. The worksheet now shows:

Code: Select all

Jenny Lee	212-867-5309	<Respondent fullname='Jenny Lee' phonenumber='212-867-5309' />
Peggy Sue	213-234-5789	<Respondent fullname='Peggy Sue' phonenumber='213-234-5789' />
Select column C and type ctrl-c. Open AddressBook.xml in Notepad. Position the cursor after the <AddressBook> line. Type ctrl-v. Save file. Start MJ to see result.
Darkman90808
Dan Should Pay Me
Posts: 701
Joined: Wed Feb 27, 2008 9:20 pm

Post by Darkman90808 »

Unbelievable! Thank you (once again!), Stewart...
magicmatt
MagicJack Newbie
Posts: 5
Joined: Mon May 19, 2008 9:28 am
Location: Connecticut

Post by magicmatt »

ahhhh - thanks. I will have to try that later. I never noticed any of the XML formating opening with Excel... thanks for the fancy pants "&A1&" trick too, that makes the whole copy paste thing painless enough.
magicmatt
MagicJack Newbie
Posts: 5
Joined: Mon May 19, 2008 9:28 am
Location: Connecticut

Post by magicmatt »

That works like a charm- notepad is definately the tool of choice for the job. Many thanks!
bueroj
MagicJack Newbie
Posts: 1
Joined: Tue May 20, 2008 8:39 pm

Post by bueroj »

Stewart wrote:You can hack this in Excel. Say your spreadsheet looks like this, in A1 .. B2:

Code: Select all

Jenny Lee	212-867-5309
Peggy Sue	213-234-5789
In cell C1, enter this formula:

Code: Select all

="<Respondent fullname='"&A1&"' phonenumber='"&B1&"' />"
Copy the formula down column C. The worksheet now shows:

Code: Select all

Jenny Lee	212-867-5309	<Respondent fullname='Jenny Lee' phonenumber='212-867-5309' />
Peggy Sue	213-234-5789	<Respondent fullname='Peggy Sue' phonenumber='213-234-5789' />
Select column C and type ctrl-c. Open AddressBook.xml in Notepad. Position the cursor after the <AddressBook> line. Type ctrl-v. Save file. Start MJ to see result.
One problem I had... your names can't include an & sign.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

bueroj wrote:One problem I had... your names can't include an & sign.
You are right. A cheap hack like this won't handle special characters (ampersand, quotes, brackets, possibly some others). A half-assed fix for just the & sign:

Code: Select all

="<Respondent fullname='"&SUBSTITUTE(A1,"&","&")&"' phonenumber='"&B1&"' />"
YL Groper
MagicJack Newbie
Posts: 2
Joined: Tue May 27, 2008 10:02 pm

Post by YL Groper »

I am glad this was brought up here because this was one of the reasons i was searching for a MJ forum, being that MJ's tech support cookie cutter answers are garbage.

Unfortunately, this didn't work for me. Magic jack is now showing no contacts. I only had 4 in there because i was waiting for a work around like this to avoid having to do all of them manually.

Here is the deal, I am copying over 119 contacts. I have a master list generated from outlook, bitpim etc...Some of the phone numbers have dashes between the prefix and area codes, some dont.

I have copied your formulas to C in excel, it generates, then I copy that C column into the the MJ addressbook.xml in notepad. I do this with magicjack plugged in so i have access to the MJ drive to access the address book xml file. All contents of column C go between <address book> and </Address Book> in the body of the file. I then save the file, close it, unplug magic jack, and then plug it back in and magic jack list no contacts.

What am I doing wrong here?
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

With MJ plugged in, shut down the magicjack application, e.g. with Task Manager. Then open the XML file, edit it, save it. Start MJ again, e.g. from the desktop shortcut.

Test the scheme first, using only one or two entries that don't have any strange formatting. Once that works, try your whole list. If that fails, try smaller chunks to see what it doesn't like, then either correct the formats manually or add suitable logic to the formula.
YL Groper
MagicJack Newbie
Posts: 2
Joined: Tue May 27, 2008 10:02 pm

Post by YL Groper »

It appears my problem was a single apostrophe in one of my contacts. "Fry's Electronics" had to be changed.

Now if only magicjack would work with musicmatch jukebox, it would be flawless.
kcowan
MagicJack Contributor
Posts: 51
Joined: Mon May 26, 2008 12:46 pm

Post by kcowan »

Stewart wrote:Open AddressBook.xml in Notepad. Position the cursor after the <AddressBook> line. Type ctrl-v. Save file. Start MJ to see result.
I have searched for AddressBook.xml and it cannot find it. What can I do?

Edit: Nevermind. I searched in the magicJack device. Doh! "G:\magicjack\AddressBook.xml"

After eliminating all the special characters in the names, e.g. John & Jane Doe, and positioning the end AddressBook properly it worked easily. Thanks.

BTW: Replacing the & with a dash allows couples, e.g. John-Jane Doe

Thanks for the hacks. This forum is great!
For the fun of it....Keith
kcowan
MagicJack Contributor
Posts: 51
Joined: Mon May 26, 2008 12:46 pm

Post by kcowan »

So unplugging and replugging work fine. But using the shutdown and restart hacks gives me the original entry of only
test and 9999999999!
For the fun of it....Keith
kcowan
MagicJack Contributor
Posts: 51
Joined: Mon May 26, 2008 12:46 pm

Post by kcowan »

bueroj wrote:
Stewart wrote:You can hack this in Excel. Say your spreadsheet looks like this, in A1 .. B2:

Code: Select all

Jenny Lee	212-867-5309
Peggy Sue	213-234-5789
In cell C1, enter this formula:

Code: Select all

="<Respondent fullname='"&A1&"' phonenumber='"&B1&"' />"
Copy the formula down column C. The worksheet now shows:

Code: Select all

Jenny Lee	212-867-5309	<Respondent fullname='Jenny Lee' phonenumber='212-867-5309' />
Peggy Sue	213-234-5789	<Respondent fullname='Peggy Sue' phonenumber='213-234-5789' />
Select column C and type ctrl-c. Open AddressBook.xml in Notepad. Position the cursor after the <AddressBook> line. Type ctrl-v. Save file. Start MJ to see result.
One problem I had... your names can't include an & sign.
Replacing the & signs with - signs works for me. I also had to modify the code to the following:

Code: Select all

="<Respondent fullname='"&A1&"' phonenumber='"&B1&"' modified='2008-06-14 11:00:00'><vCard/></Respondent>"
For the fun of it....Keith
signupstuffid
MagicJack Newbie
Posts: 1
Joined: Sat Jul 19, 2008 8:02 am

Post by signupstuffid »

@kcowan- Your modified script worked for me. Thanks!
This thread should be stickied!!
Post Reply