• 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: New to applescript: year of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New to applescript: year of


  • Subject: Re: New to applescript: year of
  • From: Francis Derive <email@hidden>
  • Date: Wed, 27 Sep 2006 13:25:03 +0200


On Sep 27, 2006, at 12:21 PM, Yvan KOENIG wrote:

It seems that some application's AppleScript's implementation is lazy.

This slightly modified code works for me:

repeat with myMessage in messages of mailbox "myMailbox"
	set myYear to year of ( get date received of myMessage)
	log myYear
end repeat


Yvan,

*I* may say I have been lazy - because I read the "get" does return a result "result", even if sometimes it is not needed.
Anyway, good lesson.
I don't want to go to far but then


	if myYear = 2004 then
		move myMessage to mailbox "essai"
	end if

says :
	get date received of item 12 of every message of mailbox "myMailbox"
		date "vendredi 29 octobre 2004 12:00:30"
	move item 12 of every message of mailbox "myMailbox" to mailbox "essai"
		"Mail got an error: NSInternalScriptError"

I had tried a move <message> to <mailbox> before with no problem - but where is it ?

Thanks.


_______________________________________________ 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: New to applescript: year of
      • From: Yvan KOENIG <email@hidden>
References: 
 >New to applescript: year of (From: Francis Derive <email@hidden>)
 >Re: New to applescript: year of (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Calling a property by using a string
  • Next by Date: Re: acrobat and applescript
  • Previous by thread: Re: New to applescript: year of
  • Next by thread: Re: New to applescript: year of
  • Index(es):
    • Date
    • Thread