• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can ´ t move mail message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Can´t move mail message
      • From: Juan Pablo Garcia <email@hidden>
References: 
 >Can´t move mail message (From: Juan Pablo Garcia <email@hidden>)

  • Prev by Date: Re: Can ´ t move mail message
  • Next by Date: Re: determine Admin vs nonAdmin users
  • Previous by thread: Re: Can ´ t move mail message
  • Next by thread: Re: Can´t move mail message
  • Index(es):
    • Date
    • Thread