• 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: Account Mail Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Account Mail Question


  • Subject: Re: Account Mail Question
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 29 Dec 2007 19:13:17 -0600

On Dec 29, 2007, at 6:02 PM, m wrote:

Michelle,
Using your script,

tell application "Mail"
	tell message viewer 1
		set theMSG to first item of (messages whose id is 59252)
	end tell
	move theMSG to mailbox "INBOX_Duplicates"
end tell

I get the error message "The variable theMSG is not defined." if I am online. Highlighted is "TheMSG" in line 5.

I just noticed, so I'll pass this along. In all of my Mail scripting, I have never used "tell message viewer 1" and have not ever seen this used until now. The line "set theMSG to first item of (messages whose id is 59252)", if it works, should work without the "tell message viewer 1" block. You do, however, have to have an existing message viewer.


Another reason for an error might be assuming that you are dealing with a list. Sometimes AppleScript fails to pass single items as a list. You might want to try ...
set theMSG to some message whose id is 59252


I still think using the id is a bad idea. BTW, how do you know the id number?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Account Mail Question
      • From: Michelle Steiner <email@hidden>
References: 
 >Account Mail Question (From: m <email@hidden>)
 >Re: Account Mail Question (From: Luther Fuller <email@hidden>)
 >Re: Account Mail Question (From: m <email@hidden>)
 >Re: Account Mail Question (From: Luther Fuller <email@hidden>)
 >Re: Account Mail Question (From: m <email@hidden>)
 >Re: Account Mail Question (From: Luther Fuller <email@hidden>)
 >Re: Account Mail Question (From: m <email@hidden>)
 >Re: Account Mail Question (From: Michelle Steiner <email@hidden>)
 >Re: Account Mail Question (From: m <email@hidden>)

  • Prev by Date: Re: Account Mail Question
  • Next by Date: Re: Account Mail Question
  • Previous by thread: Re: Account Mail Question
  • Next by thread: Re: Account Mail Question
  • Index(es):
    • Date
    • Thread