Making mass changes to the Address Book
I need to update birthdays, update addresses, etc. I don't want to go into every card and would prefer do it in a spreadsheet.
I have tried Bento but it doesn't seem to work. Any other ideas?
Thanks, Bob
export your contacts as one big vcard. convert it to a csv file using for example this converter http://labs.brotherli.ch/vcfconvert/
and edit it in excel or pages. then import the csv file back into AB.
Similar Messages
-
Problem with synchronization of the Address Book
My problem is in the synchronization of the Address Book:
if I add or delete a contact in the iPhone or nell'iPad, syncing, iTunes tells me that there will be a change in the address book, but then in the Address Book on my Mac the new name does not exist or, if I deleted, remains .
If I make a change (eg. Put an address or a birthday) in contacts of the iPhone or iPad, iTunes tells me that I'm editing the Address Book, but then the change is not in the Mac
The strange thing is that after the synchronization, if I delete the new name or the variation in the iPhone or iPad, iTunes tells me again that it is making a change on something in the Mac Address Book I can not see, but which evidently is somewhere, but does not appear for whatever **** reason.
On the contrary, working on the Address Book in Mac, synchronization is successful, and devices that I feedback positively what I added or removed from my Mac
The synchronization of iCal instead occurs regularly in both directions.
MacBook Intel Core 2 Duo
OS Snow Leopard 10.6.8
iPhone 4 16G
iPad 3 16G
All applications updated
I do not use iCloudHi Krishna,
The only solution I can think of displaying the doc inside the portal content area is to create a document iView, embed this iView in a role and then in the link use:
http://<server>:<port>/irj/portal?NavigationTarget=ROLES://<PCD Location of the iView inside the role>
But that is not very short.
Best regards,
Avishai Zamir -
My Mail Account in linked to my address book. The address book shows First Name, Last Name. When I start an email in Mail, the name does appear but the order is reversed...Last Name, First Name. I must have changed a setting somewhere but I don't know where. Does anyone know how to correct it?
I don't have any problem with my system. My guess is there is something there you aren't quite getting. I'd recommend a visit to your Apple Store, AASP or to contact AppleCare so they can coach you personally.
You can also play with the Address Book Preferences. However to see how changing a Preference affects the Address Book drag the Preferences window off of the Address Book so you can see both the Preferences window and Address Book Windows. Then toggle a Preference and you will see it instantly changes in the Address Book. -
On my old Macbook whenever I would sync my iphone, if I had changed something on the calendar it gives me the option to choose between the computer event or the iphone event (so lets say I'm out and I changed the time of my appointment on my phone, when I get home and sync my phone I choose to keep the time I changed it to on my phone, not what's on my computer).
Now... what's happening is I'm getting the message: syncing your contacts will change more than 5% of the contacts on the COMPUTER. So that means, all the bulk changes I just made in address book on the computer are going to get deleted and replaced with what is originally on the phone. That's not what I want. I want to change what's on the phone with the changes I made on the computer in address book. Make sense? How do I do that? Because I don't necessarily want to wipe out everything on the phone because I don't know if that has been transferred to the address book... So If I added some phone numbers within the last month (i don't remember the last time I synced my phone), then I would loose them if I chose to replace information on the phone with what's on the computer (there's an option to do that under info when syncing).
Does that make sense? Please let me know it this is at all confusing. I'm really trying to resolve this before Saturday early morning ... My mom is going out of town and it's her work phone, so I need to figure this out for her. Thanks a bunch!mnjclark,
I'm glad to hear that you have found a work-a-round so that your device works while making calls meanwhile being connected to Bluetooth to your automobile.
At this time, based on the way the device was manufactured, there is no setting available that will allow this change to be permanent. When the device is rebooted, the settings may be adjusted which will require you to manually change back to CDMA only mode if needed.
EfrainM_VZW
Follow us on Twitter @VZWSupport -
I have been unable to sync my address book on my IPHONE, trying to sync the changes, I erased address book from my phone. I seem unable to re-establish the address book from my Mac on my phone! Please help!! thanks
Try the .Mac Sync forum - its probably more appropriate to your issue.
http://discussions.apple.com/forum.jspa?forumID=957 -
In the Address Book Print Preview mode I changed the R margin to 6 so that I don't have to print the long lines dividing the addresses. I decreased the top & bottom margins to .2 I also changed it to 50% and unchecked headers & footers. Now is there a way that I can copy/paste this to a spreadsheet so that I can put the addresses in columns and not have to waste so many sheets of paper to print it? Is there a way to delete the spaces between rows, even deleting the line between addresses? Is there a way to save the actual list to my comptuer ...not in the csv or txt form ...just a list?
https://getsatisfaction.com/mozilla_messaging/topics/how_to_print_thunderbird_address_book
-
How can I increase entries in the address book???
The Address Book only accept 500 entries by user,
I don't found where i can change this parameterI have checked the same, but still I am able to see up to 200 entires only. when I try to find out the other users details by using the search option I could able to find out the user details.
Pls help me out
my contact Id. [email protected] -
After a computer crash, I had to load Thunderbird (v31.3.0) back into my machine running Windows 8.1, and I successfully imported my address book back up file into Thunderbird (v31.3.0).
My problem is that I don't see an option to sort the address book by "Last" name, which was available with the version of Thunderbird I had before the crash.
How can I get the address book to sort by "Last" name?In 'Address Book'
Select address book
'View' > 'Show name as' > 'Last/First'
The you can sort by Name.
Either click on 'Name' column header to change sort order,
If reversed, then click on 'Name' column header again to reverse the order.
Or
'View' > 'Sort By' > choose 'Name' and 'Ascending' -
I can no longer simply double click on a name in the contacts list to place that name into an an email??
You now have to select a single name(or a group), and hit the "TO" button.
Have the engineers at Apple gone nuts?? They just made it more difficult to add names?? Are they going for a windows workability??
If anyone out there can tell me how to go back to this feature, please, please let me know..
Adding addresses is now not working very well....?? Please help!
RandyOK, JUST TO CLARIFY: I OPEN MY MAIL PROGRAM. I then start a new letter. I then click on the little person icon button which opens up the address/contacts list. This action does not open up the address book as such.
I simply want to select various contacts from the list. But now I can no longer simply go down the list to double click on those contacts that I want to automatically drop into the TO field of my new message. It does not work any longer in Mavericks??
Now I have to click on each contact, and then go up, and click again on the TO button ....
Can Apple please stop making tasks more difficult?? The previous version worked great, and now it has been upgraded so that it doesn't work as simply as it did??
Frustrated.!!! -
I seem to have lost the groups from my Address Book in the address book tool in Mail. When I try to address a new email, all my contacts are grouped under all and the other groups found in my Address Book application are missing. Is there a way to get the groups to show up in the address book within Mail?
When you make changes in AB, quit Mail for the changes to be added to Mail's database file. Reopen Mail and try it.
-
In Lion, can I hide the address book without the application closing?
In Snow Leopard, when I clicked the red circle in the upper left-hand corner of the address book, the application automatically hid without closing entirely. In Lion, the same action closes the application so every time I need to use it, the address book has to reopen and reboot. Is there a way to change my preferences so the application hides instead of closing?
I have to keep a number of documents and other files minimized, which really crowds my dock. I'd rather be able to hide applications like calendar (which hides without an issue) and address book. I'm not sure why apple made this change. Most of the other appliations work this way—hiding when you hit the red button. I've been minimizing, but finding it a cumbersome way to use the application.
-
HOW TO SEND PERSONALIZED EMAILS WITH THE SAME MESSAGE, BUT WITH THE INDIVIDUAL RECIPIENT'S NAME... (OR NAME AND THE EMAIL ADDRESS) TO ALL ADDRESSES IN THE ADDRESS BOOK - WITH RECIPIENTS SEEING ONLY THEIR OWN NAME WITHIN THE BODY OF THE MESSAGE TO THEM ?
ALSO, HOW TO ELIMINATE ALL THE OTHER NAMES FROM THE LIST - SO THEY CAN NOT SEE WHO ELSE IS ON THE MAILING LIST, AND WHO ELSE IS GETTING THE SAME MESSAGE?In the csv file, the column headers must match the the special references in curly brackets.
So you either change the column header in .csv file or the bit in the curly brackets in the Template email.
To change the column header:
In the example shown below, I wanted to use the first two columns
'First Name', 'Last Name' note the exact spelling.
I also wanted the email address which was in a column called 'Primary Email'.
To make it easier for me, I copied the Primary Email column and inserted it into the third column position and then changed the column header name from 'Primary Email' to 'Email'. (This meant I still had the original column header just in case). see image below.
But you could just change the column header name from 'Primary Email' to 'Email' without moving column about - up to you.
At this point check that all the contacts do have a valid email address.
then save the file.
If you do not want to edit the .csv file, then you need to edit the template email.
eg: {{First Name}} {{Last Name}} <{{Email}}>
change to : {{First Name}} {{Last Name}} <{{Primary Email}}>
If still having an issue, please post two images.
One image needs to show the row of column headers used in .csv file.
The other image needs to show the Template email, so I can see how you have used the curly brackets. -
How to get the Domain Name of recipient Email ID when the recipient in the Address Book
Hi All,
I am new in Outlook Development and I have stuck in a situation, please find below the situation:
I want to get the recipient domain address when someone is sending the email. Now, the thing is that I am facing the issues when the Email Id is in the address book. For an example "John Smith @live.com" is the email ID but when this email is in
the address book it shows "John Smith ". I’m trying to read out the email address from an Exchange connected Outlook in time of sending the email.
So, my question is how I can get the domain in this situation?
Thanks in Advance..Hi,
Based on my research, there is no way to change the behavior on Outlook side. Email addresses are resolved to user names by Exchange server which is expected by design.
I'd recommend you post a new question in the Exchange forum to see if we can achieve the goal on Exchange side. For your convenience:
https://social.technet.microsoft.com/Forums/office/en-US/home?category=exchangeserver
Regards,
Steve Fan
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
Apple Script to Sort through the Address Book
Dear All,
I am quite new to Apple and just a learner on Apple-scripts. Its been quite a task to learn.. I would require some help on a few things..
The script will eventually use numbers to send email and get the user inputs and any yet to reach there..
After going through lots of scripts to sort through the address book and make a clean address book, i found they are quite slow in processing takes about 20~30 Minutes to get through 2000 Contacts..
Hence after reading posting of Mr. Koenig & Mr. Hiroto and specifically on deep copy. I have written the following code which does the following on 2000 records within 6~8Mins.
The Script work its way through all the contact is the address List.. and creates Groups
1. Duplicate Email Id's — List of Contacts with same email ID's including Contacts where the email Id is entered twice.. (Strange.. Address Book Issue, copy of the email Id under work & home)
2. Duplicate Phone — List of Contacts with same Phone Numbers including Contacts where the Phone Nos is entered twice.
3. Duplicate Name — List of Contacts with Same Names
4. Duplicate No Name — List of Contacts without the First Name and Last Name
it also sort the Contacts under the following Group which you can edit later with all the information's..
1. Only Email Ids — List of Contacts with Email ID and No Phone Numbers
2. Only Phone — List of Contacts with Phone Numbers and No Email Id's
3. No Email or Phone — List of Contacts with No Email Id's and No Phone numbers (some half completed contacts )
My Question to the forum is why is the following code still taking too much time..
set onlyDupEList to every person of group theGroupEmail
repeat with j from 1 to count of Dup_email
set tempdata to item j of Dup_email
if onlyDupEList does not contain {tempdata} then add tempdata to group theGroupEmail
end repeat
save application "Address Book"
and the scripts slows down when the items in the list is quite large (over 800 or so )..
Any help is appreciated and thanks in advance..
-- the code ---
global MsgTitle
on run
set MsgTitle to "Search for Duplicates in Address Book Contacts"
display dialog ¬
"This Script takes a while to finish" & return & "maybe 10 min or More..." & return & "Depending on the Address Book Contacts." & return & return & "Hence Allow it to run for the while" with title MsgTitle ¬
with icon 1 ¬
buttons {"Continue"} ¬
giving up after 5
set question to display dialog "Select the Duplicate Search Parameter " with icon 1 with title MsgTitle ¬
buttons {"Contact Name", "Contacts on Phone & Email Id's", "Quit"} default button 3
set rtnValue to button returned of question
if rtnValue is "Quit" then
-- tell application "Address Book" to quit
tell me to quit
end if
if rtnValue is "Contact Name" then
-- tell application "Address Book" to quit
GetDup_byName("Duplicate Name")
end if
if rtnValue is "Contacts on Phone & Email Id's" then --Contacts on Phone & Email Id's
-- tell application "Address Book" to quit
Get_dup()
end if
end run
--- Search on Name Field ---
on GetDup_byName(theGroupName)
set question to display dialog "Do you want to search for duplicates based on Names? " with icon 0 with title MsgTitle ¬
buttons {"Continue", "Quit"} default button 1
set rtnValue to button returned of question
if rtnValue is "Quit" then
-- tell application "Address Book" to quit
tell me to quit
end if
tell application "Address Book"
activate
set biglist to {}
set NoNameList to {}
set theGroupNoName to "Duplicates No Names"
set theGroup to theGroupName
-- if not (exists (group "Dupilicate Entries")) then
if not (exists (group theGroup)) then
make new group with properties {name:theGroup}
save
end if
if not (exists (group theGroupNoName)) then
make new group with properties {name:theGroupNoName}
save
end if
set the_names to name of people
repeat with i from 1 to number of items in the_names
set theName to item i of the_names
-- return theName
if theName is not in biglist then
copy theName to end of biglist
else
set counter to (people whose name is theName)
if (count of counter) > 1 then
repeat with i from 1 to number of items in counter
set this_item to item i of counter
-- display dialog this_item
add this_item to group theGroup
end repeat
-- return counter as string
end if
end if
-- captures the Contacts without Name ---
if theName contains "@" then
-- display dialog theName
set counterList to (people whose name is theName)
repeat with i from 1 to number of items in counterList
set this_item to item i of counterList
-- display dialog this_item
add this_item to group theGroupNoName
end repeat
end if
-- save application "Address Book"
end repeat
save application "Address Book"
set peopleCount to (count every person)
-- set peopleCount to 50 -- only for testing --
repeat with i from 1 to peopleCount
set first_name to first name of person i as string
set Last_Name to last name of person i as string
if first_name is equal to "missing value" and Last_Name is equal to "missing value" then
-- display dialog first_name & " : " & Last_Name
set end of NoNameList to (id of person i)
end if
end repeat
repeat with j from 1 to the count of NoNameList
set tempdata to item j of NoNameList
-- set testdata to person id tempdata
-- if (name of groups of testdata does not contain theGroupNoEmail) then
add tempdata to group theGroupNoName
-- end if
end repeat
save application "Address Book"*)
display dialog ¬
"This Script Finished Processing Address Book Contacts the Duplicates are in the group" with title MsgTitle ¬
with icon 1 ¬
buttons {"Continue"} ¬
giving up after 5
end tell
end GetDup_byName
on Get_dup()
set question to display dialog "Do you want to search for duplicates based on Names? " with icon 0 with title MsgTitle ¬
buttons {"Continue", "Quit"} default button 1
set rtnValue to button returned of question
if rtnValue is "Quit" then
-- tell application "Address Book" to quit
tell me to quit
end if
tell application "Address Book"
activate
set theGroupEmail to "Duplicate Email Id's"
set theGroupPhone to "Duplicate Phone"
set theGroupNoEmail to "Only Phone Numbers"
set thegroupNoPhone to "Only Email Id's"
set theGroupNoData to "No Email or Phone"
-- set theGroup to theGroupName
if not (exists (group theGroupEmail)) then
make new group with properties {name:theGroupEmail}
save "Address Book"
end if
if not (exists (group theGroupPhone)) then
make new group with properties {name:theGroupPhone}
save "Address Book"
end if
if not (exists (group theGroupNoEmail)) then
make new group with properties {name:theGroupNoEmail}
save "Address Book"
end if
if not (exists (group thegroupNoPhone)) then
make new group with properties {name:thegroupNoPhone}
save "Address Book"
end if
if not (exists (group theGroupNoData)) then
make new group with properties {name:theGroupNoData}
save "Address Book"
end if
set ListofPeople to people --the_ID
set ListofEmailID to value of emails of people --the_emails
-- return ListofEmailID
set ListofPhones to value of phone of people -- the_phones
-- return ListofPhones
set biglist to {}
set ListEmail_Uniq to {}
set ListEmail_Dup to {}
set No_PhoneList to {}
set No_EmailList to {}
set No_dataList to {}
set FlagEmail to false
set FlagPhone to false
-- repeat with i from 1 to number of items in the_emails
repeat with i from 1 to count of ListofEmailID
set thePersonID to item i of ListofPeople
set theEmails to item i of ListofEmailID
if theEmails is equal to {} then
set end of No_EmailList to thePersonID
else
-- set FlagEmail to true
repeat with j from 1 to count of theEmails
set tmpdata to item j of theEmails
-- return tmpdata
if tmpdata is not in biglist then
set end of biglist to tmpdata
set end of ListEmail_Uniq to {tmpdata} & {thePersonID}
else
set end of ListEmail_Dup to {tmpdata} & {thePersonID}
end if
end repeat
end if
end repeat
-- return ListEmail_Uniq
-- return ListEmail_Dup
-- save application "Address Book"
set biglist to {}
set ListPhone_Uniq to {}
set ListPhone_Dup to {}
-- repeat with i from 1 to number of items in the_emails
repeat with i from 1 to count of ListofPhones
set thePersonID to item i of ListofPeople
set thePhones to item i of ListofPhones
if thePhones is equal to {} then
set end of No_PhoneList to thePersonID
else
-- set FlagPhone to true
repeat with j from 1 to count of thePhones
set tmpdata to item j of thePhones
-- return tmpdata
if tmpdata is not in biglist then
set end of biglist to tmpdata
set end of ListPhone_Uniq to {tmpdata} & {thePersonID}
else
set end of ListPhone_Dup to {tmpdata} & {thePersonID}
end if
end repeat
end if
end repeat
-- return ListPhone_Uniq
-- return ListPhone_Dup
set the Dup_email to {}
-- Find the Duplicates from the sorted list --
repeat with i from 1 to the count of ListEmail_Dup
set tempdata to item i of ListEmail_Dup
set dataEmailDup to item 1 of tempdata
set dataPersonDup to item 2 of tempdata
repeat with j from 1 to the count of ListEmail_Uniq
set tempdata to item j of ListEmail_Uniq
set dataEmailUniq to item 1 of tempdata
set dataPersonUniq to item 2 of tempdata
-- display dialog mainEmail1 & "=" & mainEmail2 & " " & mainID1 & "=" & mainID2
if dataEmailDup is equal to dataEmailUniq then
set end of Dup_email to dataPersonDup -- & "," & dataPersonUniq
set end of Dup_email to dataPersonUniq
end if
(* -- the code takes lot more time if add to group was used --
if dataEmailDup is equal to dataEmailUniq then
set testdata to person id dataPersonDup
add testdata to group theGroup
set testdata to person id dataPersonUniq
add testdata to group theGroup
end if
end repeat
end repeat
-- return Dup_email
set the Dup_Phone to {}
-- Find the Duplicates from the sorted list --
repeat with i from 1 to the count of ListPhone_Dup
set tempdata to item i of ListPhone_Dup
set dataPhoneDup to item 1 of tempdata
set dataPersonDup to item 2 of tempdata
repeat with j from 1 to the count of ListPhone_Uniq
set tempdata to item j of ListPhone_Uniq
set dataPhoneUniq to item 1 of tempdata
set dataPersonUniq to item 2 of tempdata
-- display dialog mainEmail1 & "=" & mainEmail2 & " " & mainID1 & "=" & mainID2
if dataPhoneDup is equal to dataPhoneUniq then
set end of Dup_Phone to dataPersonDup -- & "," & dataPersonUniq
set end of Dup_Phone to dataPersonUniq
end if
(*if dataPhoneDup is equal to dataPhoneUniq then
set testdata to person id dataPersonDup
add testdata to group theGroup
set testdata to person id dataPersonUniq
add testdata to group theGroup
-- save
end if*)
end repeat
end repeat
-- return Dup_Phone
set onlyDupEList to every person of group theGroupEmail
repeat with j from 1 to count of Dup_email
set tempdata to item j of Dup_email
if onlyDupEList does not contain {tempdata} then add tempdata to group theGroupEmail
end repeat
save application "Address Book"
set onlyDupPList to every person of group theGroupPhone
repeat with j from 1 to count of Dup_Phone
set tempdata to item j of Dup_Phone
if onlyDupPList does not contain {tempdata} then add tempdata to group theGroupPhone
end repeat
save application "Address Book"
set onlyPhoneList to every person of group theGroupNoEmail
repeat with j from 1 to the count of No_EmailList
set tempdata1 to item j of No_EmailList
if No_PhoneList does not contain {tempdata1} then
if onlyPhoneList does not contain {tempdata1} then add tempdata1 to group theGroupNoEmail
end if
(*set flagE to false
repeat with i from 1 to the count of No_PhoneList
set tempdata2 to item i of No_PhoneList
if tempdata1 is equal to tempdata2 then
set flagE to true
exit repeat
end if
end repeat
if flagE is false then add tempdata1 to group theGroupNoEmail*)
end repeat
save application "Address Book"
set onlyEmailList to every person of group thegroupNoPhone
repeat with j from 1 to the count of No_PhoneList
set tempdata1 to item j of No_PhoneList
if No_EmailList does not contain {tempdata1} then
if onlyEmailList does not contain {tempdata1} then add tempdata1 to group thegroupNoPhone
end if
end repeat
save application "Address Book"
set onlyList to every person of group theGroupNoData
repeat with i from 1 to count of ListofPeople
if (item i of ListofEmailID is equal to {}) and (item i of ListofPhones is equal to {}) then
set tempdata to item i of ListofPeople
if onlyList does not contain {tempdata} then add tempdata to group theGroupNoData
end if
end repeat
save application "Address Book"
display dialog ¬
"This Script Finished Processing Address Book Contacts the Duplicates are in the group" with title MsgTitle ¬
with icon 1 ¬
buttons {"Continue"} ¬
giving up after 5
end tell
end Get_dup
on quit
--set MsgTitle to "Change Email ID's Domain Name"
save application "Address Book"
display dialog "Contact Srikanth Kamath at [email protected] for any Help" with title MsgTitle with icon 1 buttons "OK"
continue quit
end quitHello Srikanth Kamath,
I'm not sure you're still following this thread, but anyway here's sample code I said I'd post later.
--SCRIPT2
main()
on main()
script o
-- input data
property xx : {1, 2, 3, 4, 5} -- list of parents
property yy : {{"g", "h"}, {"a", "b"}, {"b", "e", "f"}, {"e"}, {"c", "d"}} -- list of children per parent
-- work list
property pp : {} -- list of children tagged by parent; i.e, lits of {child, parent}
property qq : {}
property rr : {}
-- (1) build list of children tagged by parent
repeat with i from 1 to count my xx
set x to my xx's item i
set y to my yy's item i
repeat with p in y
set end of my pp to {p's contents, x}
end repeat
end repeat
--return pp -- {{"g", 1}, {"h", 1}, {"a", 2}, {"b", 2}, {"b", 3}, {"e", 3}, {"f", 3}, {"e", 4}, {"c", 5}, {"d", 5}}
-- (2) sort tagged list by child as key
msort(my by_key1, my pp)
--return pp -- {{"a", 2}, {"b", 2}, {"b", 3}, {"c", 5}, {"d", 5}, {"e", 3}, {"e", 4}, {"f", 3}, {"g", 1}, {"h", 1}}
-- (3) retrieve parents with duplicate child
(* retrieve list of {child, parent} for duplicate child *)
set my qq to uniq(my eq_key1, my pp, {_dup:true})
--return qq -- {{"b", 2}, {"b", 3}, {"e", 3}, {"e", 4}}
(* retrieve list of parent *)
repeat with q in my qq
set r to q's item 2
if r is not in my rr then set end of my rr to r
end repeat
return rr -- {2, 3, 4}
end script
tell o to run
end main
on by_key1(x, y)
msort's comparator for list of lists
key = item 1, ascending
returns true iff x and y are out of order
return x's item 1 > y's item 1
end by_key1
on eq_key1(x, y)
uniq's comparator for list of lists
key = item 1
returns true iff x and y are considered equal
return x's item 1 = y's item 1
end eq_key1
on msort(cmp_, aa) -- v1.2f2
Basic recursive merge sort handler having list sorted in place.
handler cmp_ : comparator
* cmp_(x, y) must return true iff list element x and y are out of order.
list aa : list to be sorted in place
script o
property parent : {} -- limit closure to minimum
property xx : aa -- to be sorted in place
property xxl : count my xx
property yy : {}
property cmp : cmp_
on merge(p, q, r)
property xx: source list
integer p, q, r : absolute indices to specify range to be merged such that
xx's items p thru r is the target range,
xx's items p thru (q-1) is the first sublist,
xx's items q thru r is the second sublist.
(p < q <= r)
local i, j, k, xp, xr, yi, yj, ix, jx
if r - p = 1 then
set xp to my xx's item p
set xr to my xx's item r
if my cmp(xp, xr) then
set my xx's item p to xr
set my xx's item r to xp
end if
return -- exit
else
if p < q - 1 then merge(p, (p + q) div 2, q - 1)
merge(q, (q + r + 1) div 2, r)
end if
At this point, sublits xx[p, q-1] and xx[q, r] have been already sorted (p < q <= r)
if my cmp(my xx's item (q - 1), my xx's item q) then
else -- xx[p, q-1] & xx[q, r] are already sorted
return
end if
set yy to my xx's items p thru r -- working copy for comparison
set ix to q - p
set jx to r - p + 1
set i to 1
set j to q - p + 1
set k to p
set yi to my yy's item i
set yj to my yy's item j
repeat
if my cmp(yi, yj) then
set my xx's item k to yj
set j to j + 1
set k to k + 1
if j > jx then
set my xx's item k to yi
set i to i + 1
set k to k + 1
repeat until k > r
set my xx's item k to my yy's item i
set i to i + 1
set k to k + 1
end repeat
return
end if
set yj to my yy's item j
else
set my xx's item k to yi
set i to i + 1
set k to k + 1
if i > ix then
set my xx's item k to yj
set j to j + 1
set k to k + 1
repeat until k > r
set my xx's item k to my yy's item j
set j to j + 1
set k to k + 1
end repeat
return
end if
set yi to my yy's item i
end if
end repeat
end merge
on cmp(x, y)
(* primary comparator *)
return x > y
end cmp
local d, i, j
if xxl ≤ 1 then return
if cmp_ = {} then set my cmp to cmp -- comparator fallback
my merge(1, (xxl + 1) div 2, xxl)
end script
tell o to run
end msort
on uniq(eq_, aa, {dup:dup}) -- v0.21
handler eq_ : comparator eq_(x, y) that returns true iff x and y are considered equal
list aa : pre-sorted list
(precisely, a list organized such that any duplicate items are adjacent to each other)
boolean _dup : option whether return unique items or duplicate items
return duplicate if true, unique otherwise.
script o
property parent : {} -- limit closure to minimum
property xx : aa
property yy : {}
property eq : eq_
on eq(x, y)
(* primitive comparator *)
x = y
end eq
if eq_ = {} then set my eq to my eq -- comparator fallback
local t, x, _on
if (count my xx) < 2 then return my xx's contents
if _dup then
set _on to false
set t to my xx's item 1
repeat with i from 2 to count my xx
set x to my xx's item i
if eq(x, t) then
set end of my yy to t
set _on to true
else if _on then
set end of my yy to t
set _on to false
end if
set t to x
end repeat
if _on then set end of my yy to x
return my yy's contents -- return duplicate elements
else
set t to my xx's item 1
set end of my yy to t
repeat with i from 2 to count my xx
set x to my xx's item i
if eq(x, t) then
else
set end of my yy to x
set t to x
end if
end repeat
return my yy's contents -- return uinque elements
end if
end script
tell o to run
end uniq
--END OF SCRIPT2
In order to apply it to your current Address Book problem, replace the main() handler with something like the following one.
--SCRIPT2a (part)
on main()
script o
-- input data
property xx : {} -- list of parent; given later
property yy : {} -- list of children per parent; given later
-- work list
property pp : {} -- list of children tagged by parent; i.e, lits of {child, parent}
property qq : {}
property rr : {}
-- (0) get input data from AB
tell application "Address Book"
tell people
set xx to its id
set yy to its every email's value
end tell
end tell
-- (1) build list of children tagged by parent *)
(* omitted (same as the previous) *)
-- (2) sort tagged list by child as key
(* omitted (same as the previous) *)
-- (3) retrieve parents with duplicate child
(* omitted (same as the previous) *)
-- (4) group the retrieved people in AB
tell application "Address Book"
repeat with r in my rr
add person id r to group "duplicate email"
end repeat
end tell
end script
tell o to run
end main
--END OF SCRIPT2a
Good luck,
Hiroto
Message was edited by: Hiroto -
When I send an email my contacts are changed in my Address Book on both my Mac and iPhone4.
All my contacts are entered only in the first name space. ie John Smith is entered as John Smith in just the first name entry space - I don't use the last name space at all. When I send an email, that person's address gets changed immediately my address book which duplicates the first name into the last name space. I have tried deleting all my contacts and resynching them from my iPhone but the problem persists. Can anyone help me fix this?
I am running an iMac with Lion and my mail client is Mail. My ISP is gmail.Blair84 wrote:
Double check your contacts email, and if its incorrect, go to their contact and change it and save it or you can delete the email you put in, and manually type it in.
Hope this helps.
How would that help the original poster?
Maybe you are looking for
-
Disappearing Vertical Spry menu buttons in IE
I have some experience with web developement, but this is my first attempt at Spry menus. I have a horizontal menu that is working great, but the vertical menu doesn't work correctly in IE (I'm using IE8). It works just fine in Firefox. When I mou
-
How can I hide photos on iPhoto 11?
Hi everybody.I found the way to hide some photos on iPhoto 11.My problem is that when I hide the photos on and event,appears on the top right corner of the window the written with the number of the photos belonging to the event and the written (xxx p
-
How does the MacBook Pro cooling fan work?
Is slotted area on the back of the MBP an intake or exhaust area? I am buying a notebook cooler and I want to make sure I buy a compatible cooler; that is to say one that doesn't blow hot air into the intake or take in the hot air form the exhaust an
-
Fbpanel not showing images....
Ok I have fbpanel install and the button icons are not showing up. Curious if anyone has any idea what might cause this. This is a fresh install of arch. I have looked at the config file for the path to the image files and it is correct.
-
Is it possible to get custom eartips for the Apple In-ear headphones?
A year or so ago I purchased the Apple In-ear headphones. I use them primarily in the car when my brother plays his music through the car stereo while I'm watching a movie on my iPod Touch or my MacBook Pro. They have very good isolation, but are unc