Re: Can´t move mail message
Re: Can´t move mail message
- Subject: Re: Can´t move mail message
- From: Juan Pablo Garcia <email@hidden>
- Date: Mon, 24 Jan 2005 07:07:59 +0100
Thanks for your answers, but it doesn´t work either.
Michelle: I get the s from a popupmenu selection from RealBasic, where
it is treated as string.
Andrew: It continues without working even if I remove the braces or
parentheses. Whenever I treat is as a variable it doesn´t work, but if
I hard code the name of any of my mailboxes it works like a charm.
The other suspicious thing is that it doesn´t trigger any errors, it
just doesn´t move the message. I supposed it was because of using
"selection", but it does work telling it to go to a name of mailbox as
string.
Any ideas?
regards,
JP
El Jan 24, 2005, a las 3:09 AM, Andrew Oliver escribió:
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