Title: Re: AppleScript To Change POP Account Email Address
On 4/25/01 7:46 AM, "greg" <[EMAIL PROTECTED]> wrote:

I'm trying to change the email address of an account called"List Email" via AppleScript and when I try to run
my script below, gibberish text seems to appear in the email address box of that account... can anyone tell me
what I'm doing wrong?

thanks!

greg ^_^

---- my script ----

set
listEmailAdd to display dialog "Enter Email Address To Change:" default answer "" with icon 1

tell application "Microsoft Entourage"
    set email address of POP account "List Email" to listEmailAdd
end tell


You're trying to set an email address, which has to be a string, to a display dialog object, which is not going to work. I think you want it to be set to the 'text returned' of that display dialog object, don't you? Since 'text returned' of a display dialog is a string (if you don't cancel), this should work:

set listEmailAdd to text returned of (display dialog "Enter Email Address To Change:" default answer "" with icon 1)

tell application "Microsoft Entourage"
    set email address of POP account "List Email" to listEmailAdd
end tell


Of course, if the user really does what you ask him and enters the "email address to change" rather than the email address he wants it changed to, nothing's going to be changed here at all.

--
Paul Berkowitz

Reply via email to