Re: Can ´ t move mail message
Re: Can ´ t move mail message
- Subject: Re: Can ´ t move mail message
- From: Andrew Oliver <email@hidden>
- Date: Sun, 23 Jan 2005 18:09:45 -0800
On 1/23/05 5:42 PM, "Juan Pablo Garcia" <email@hidden>
wrote:
> Hi:
>
> if I replace the s variable in the code down here with a mailbox name
> it works, but getting the mailbox as a parameter doesn´t.
>
> to check things, I invoke a display dialog with the s variable and it
> works. I don ´t understand why the string is there for the display
> dialog, but it gets "lost" somewhere for the move command.
>
> I´m invoking this applescript code from a RealBasic Application.-
>
>
>
> on run {s}
> tell application "Mail"
> move selection to mailbox {s}
> end tell
> end run
>
> thanks a lot,
By enslosing 's' in curly braces you're coercing it to a list. Mail.app
interprets this as trying to move a message to a list of mailboxes, which it
can't do, hence the error.
The display dialog works because display dialog will silently coerce lists
to strings in order to display them.
Try removing the curly braces:
...
move selection to mailbox s
...
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden