Hi, I’m totally new to this forum and AppleScript. All I want is to make a script that, when I’m entering a new contact in Address Book, would automatically populate the city, state & zip fields for me. Most of the contacts I enter are in the same town, so it gets repetitive.
I tried reading the AppleScript Language Guide, but my brain started to hurt. I did search these forums and scriptbuilder, but couldn’t find what I’m looking for.
Most of the examples I could find involved getting information from Address Book, not putting information into it, or putting info in from other files or emails.
I know this is pathetic, but this is what I have so far. Of course it doesn’t work. How do I tell Address Book to perform these actions on the current contact? What is the proper syntax to set the city, state, and zip fields? I don’t really understand elements, properties, objects, etc.
tell application "Address Book"
set theCity to "Anytown" as string
set theState to "NY" as string
set theZip to "11111" as string
set city to theCity
set state to theState
set zip to theZip
end tell
I’m sure this would really be very simple if I knew what I was doing. Thanks in advance for any help!
Jennifer
Browser: Firefox 3.0.12
Operating System: Mac OS X (10.5)