• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: address book entries by date created
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address book entries by date created


  • Subject: Re: address book entries by date created
  • From: Christian Boyce <email@hidden>
  • Date: Sun, 19 Jun 2011 22:33:15 -0700

Or, create a group in Address Book and take all of those people that you find in Chris' script (below) and put them into that group. 

Here's how I did it:

tell application "Address Book"
set the_date to date "Sunday, June 19, 2011 12:00:00 AM"


set the_people to every person whose modification date is greater than the_date
make new group at end with properties {name:"tempgroup"}
repeat with i from 1 to count of the_people
add item i of the_people to group "tempgroup"
end repeat
save
end tell


Use Chris' way of setting a date range (I was lazy) and then add the found people to a temporary Address Book group. Then flip through the entries in that group.

c
On Jun 19, 2011, at 8:32 PM, Christopher Stone wrote:

On Jun 19, 2011, at 21:11, Joshua Whalen wrote:
I need to find a person in my address book by the date their record was created. Is there a way to do this? They only entered their email address, and I don't recall their name, otherwise I wouldn't need to do this. There's over a thousand entries in the address book.
______________________________________________________________________

Hey Joshua,

Something like this might work for you:

set dateRangeStart to date "Tuesday, September 14, 2010 00:00:00"
set dateRangeEnd to date "Wednesday, September 15, 2010 00:00:00"

set l to {}
tell application "Address Book"
try
name of people whose creation date > dateRangeStart and creation date < dateRangeEnd

on error errMsg number errNum
set sep to "=============================="
set e to sep & return & "Error: " & errMsg & return & sep & return ¬
& "Error Number: " & errNum & return & sep
beep
display dialog e
end try
end tell

# Note that 'date "1/1/2011"' will compile to:

date "Saturday, January 01, 2011 00:00:00"

# Although I believe the format depends upon your short date format in the 'Language & Text' prefs and your localization.

--
Best Regards,
Chris


--
Christian Boyce
Christian Boyce and Associates
Mac, iPhone, and iPad Consultants
310-452-3720

Read the Boyce Blog: http://christianboyce.blogspot.com
Follow us on Twitter! http://twitter.com/christianboyce
Be a fan on Facebook! http://tinyurl.com/cboyce-and-associates-facebook

Now Playing on The Boyce Blog: Radio Interview: WWDC Wrap-Up

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: address book entries by date created
      • From: Christopher Stone <email@hidden>
References: 
 >address book entries by date created (From: Joshua Whalen <email@hidden>)
 >Re: address book entries by date created (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: address book entries by date created
  • Next by Date: Looping through Numbers (iWork) sheet problem
  • Previous by thread: Re: address book entries by date created
  • Next by thread: Re: address book entries by date created
  • Index(es):
    • Date
    • Thread