Re: Entourage Script
Re: Entourage Script
- Subject: Re: Entourage Script
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 22 Apr 2003 11:34:34 -0700
On 4/22/03 11:06 AM, "Markus Stobbs" <email@hidden> wrote:
>
I'm trying to write a script to save me from the horror of opening every
>
contact in my Entourage X address book and setting it's default address from
>
work to home. It seems this is the cause of my addresses not syncing
>
properly with my Palm so I need to fix it for all contacts. Gotta love that
>
buggy Entourage conduit.
>
>
Here's the script I'm trying...
>
>
tell application "Microsoft Entourage"
>
set theContacts to every contact
>
set default postal address of every item of theContacts to "home"
>
end tell
>
>
And the error message I'm getting...
>
>
Can't set <<class Dptl>> of {<<class cAbE>> id 1 of application "Microsoft
>
Entourage", <<class cAbE>> id 478 of application "Microsoft Entourage"}
>
and so on for every id...
>
>
Anyone have any thoughts about what I might be doing wrong?
1) You're making "home" a string. It's an application constant without
quotes.
2) You're trying to set a common property of a pre-composed AppleScript list
('every item of theContacts' simply replicates the same list) rather than
acting on 'every' [some application element] directly in the application.
This is a tricky distinction, but important. Lists would have to be
specially implemented in the dictionary for this to work in the way that you
tried. (That may happen in a future version of Entourage. Very few
applications do it except for a few specific commands.)
Try this :
tell application "Microsoft Entourage"
set default postal address of every contact to home
end tell
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.