The Need for Speed: Finding Entourage contacts by display name or nickname
The Need for Speed: Finding Entourage contacts by display name or nickname
- Subject: The Need for Speed: Finding Entourage contacts by display name or nickname
- From: Jolly Roger <email@hidden>
- Date: Fri, 22 Jun 2001 10:11:37 -0500
Hi folks,
Me again with another silly Entourage question... =)
The following script searches through the Entourage contact list looking for
a contact that has the display name or nickname specified. This is
dreadfully slow in comparison to the built-in Entourage "find" utility,
which only searches for email addresses.
Anyone have any suggestions on what I might do to speed this up?
-- start script
my FindContactByDisplayName("JollyRoger")
on FindContactByDisplayName(displayName)
set startTime to (the ticks) -- Jon's Commands
set foundContact to {}
tell application "Microsoft Entourage"
repeat with c from 1 to the count of the contacts
if (displayName = (contact c's first name & " " & contact c's
last name)) or (displayName = contact c's nickname) then
set foundContact to contact c
exit repeat
end if
end repeat
end tell
-- uses Jon's Commands
log ("elapsed time: " & ((the ticks) - startTime & " ticks"))
return foundContact
end FindContactByDisplayName
-- end script
JR