Created
December 2, 2013 20:45
-
-
Save benwaldie/7758669 to your computer and use it in GitHub Desktop.
Get the address from a selected contact and add it to a Pages '09 document, right aligned, with the date.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Contacts" | |
set theSelection to selection | |
set thePerson to item 1 of theSelection | |
set theAddress to address 1 of thePerson | |
set theAddressText to formatted address of theAddress | |
end tell | |
set theDate to short date string of (current date) | |
tell application "Pages" | |
tell document 1 | |
set theText to make new paragraph at end of body text with data theDate & return & theAddressText | |
set alignment of theText to right | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment