Title: Re: Swap Home/Work addresses
On 16/1/01 11:12 pm, I wrote:
>
> So, I can normally say 'set {a,b} to {x,y} but I can't do it with the
> contacts addresses. I'll play a little more and see where the problem lies.
OK, I did a little more playing.
Here's the original script (with a bit of tidying up, including 'english' syntax! This works:
tell application "Microsoft Entourage"
set theContact to the selection
if (count of theContact) > 1 or class of item 1 of theContact is not contact then
display dialog "Please select a single contact before running this script" buttons {"Quit"} default button 1
return
end if
set theContact to item 1 of theContact
set theAddresses to {home address, business address} of theContact
set business address of theContact to item 1 of theAddresses
set home address of theContact to item 2 of theAddresses
end tell
However, if i set the last couple of lines to:
set {business address, Home Address} of theContact to theAddresses
I get the following error:
"Can't set {Business Adddress of contact id 108 of application \"Microsoft Entourage\", Home Address of contact id 108 of application \"Microsoft Entourage\"} to {{street adress:\"\", street address 2:\"\", City:\"\", State:\"\",Zip:\"\", Country:\"\"}, {street address:\"22 Highwoods Drive\", street address 2:\"\", city:\"Marlow Bottom\", state:\"Bucks\", zip:\"SL7 3PY\", country:\"\"}}. Access not allowed."
Why can I do it individually, but not combined?
--
=Barry Wainwright=
<http://homepage.mac.com/barryw>
"Teamwork is a lot of people doing what 'I' say."
-- (Mktg. executive, Citrix Corporation)
- Swap Home/Work addresses Barry Wainwright
- Re: Swap Home/Work addresses Paul Berkowitz
- Re: Swap Home/Work addresses Barry Wainwright
- Re: Swap Home/Work addresses Barry Wainwright
- Re: Swap Home/Work addresses Paul Berkowitz
- Re: Swap Home/Work addresses Barry Wainwright
- Re: Swap Home/Work addresses Barry Wainwright
- Re: Swap Home/Work addresses M. Tamer Ozsu
