Moving from Microsoft Office VBA to AppleScript:
MacTech's Guide to Making the Transition
Introduction
|
Table of Contents
Page Prev and Page Next buttons at bottom of the page.
|
April, 2007
Page 126
repeat with theContact in theContacts
repeat 1 times -- to allow for skipping contacts
if class of theContact contact then exit repeat
set theName to name of theContact
(* if the contact has no name, check for
nickname, company, email address, IM address
in that order until you find one *)
if theName = "" then set theName to nickname of theContact
if theName = "" then set theName to company of theContact
try
if theName = "" then set theName to email address 1 ¬
of theContact
end try
try
if theName = "" then set theName to ¬
instant message address 1 of theContact
end try
--if still no name, forget this one
if theName = "" then exit repeat -- go on to next one
--set a red flag
set flagged of theContact to true
-- make the task with the info
-- get the contact's categories and projects along the way
set theTask to make new task with properties {name:¬
("Flagged Contact: " & theName), due date:¬
today, remind date and time:now, category:¬
< Previous Page Next Page>
- SPREAD THE WORD:
- Slashdot
- Digg
- Del.icio.us
- Newsvine