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 120
(ASCII number (character 2 of r2)) = 255 then -- checks for Unicode
set r to read theVcard as Unicode text -- gets the data correctly
tell application "Microsoft Entourage"
make new contact at address book 1 with properties {vcard data:r1}
end tell
else
beep
display dialog "This vCard is not from Entourage and cannot be " & ¬
"imported as a contact. Sorry." buttons {"OK"} default button 1 ¬
with icon 0
end if
Send from Other Account
Frequently people receive mail at a "public" email address – which may even be an "alias" that forwards the mail on to another address. In reply, you might want to send from a different email address. Or sometimes, everything works fine when replying because the address is the appropriate one, but when sending a new (non-reply) message Entourage will naturally send it from the default account unless you remember to change the account manually in the "From" popup. Especially in business, you'd like to be able to send mail automatically from the "correct" account.
By creating a category (in Edit/Categories/Edit Categories) with the same name as the mail account, and then assigning this category to contacts in your address book to whom you wish correspondence to be sent only from that account, this script will make it possible, Again, you need to run it from a repeating Schedule every 1 minute, so it catches the message window before you send it, and changes the account while you're writing.
You need to enter the name of each such account/category, each in its own set of "quotes" and separated by commas, in the otherAccountNames property list braces, like this: {"Correspondence", "billing@mybusiness.com"}. Some people name their mail accounts as the actual email address, some give descriptive names. You must use whatever the names are as they appear in Tools/Accounts/Mail, without the (POP) or (IMAP) or (Exchange) description.
(*enter account/category names in {},
comma-separated "quoted text" items*)
property otherAccountNames : {}
tell application "Microsoft Entourage"
if otherAccounts = {} then
beep
return
end if
try
set frontWin to front window
if class of frontWin draft window then
return -- quit if no new draft window open
end if
on error
return
end try
set recipsList to every recipient of frontWin
< Previous Page Next Page>
- SPREAD THE WORD:
- Slashdot
- Digg
- Del.icio.us
- Newsvine