• 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: repeat loops on Eudora messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: repeat loops on Eudora messages


  • Subject: Re: repeat loops on Eudora messages
  • From: Rob Jorgensen <email@hidden>
  • Date: Fri, 31 Oct 2003 12:04:34 -0500

At 8:50 AM -0700 10/31/03, Doug McNutt wrote:
Chris is right and that explains why a loop like this takes forever in a big mailbox:

set thebox to mailbox of messages -- returns a reference
-- other stuff
repeat
try
set thesender to field "From:" of message 1
write thesender & return to OUTPUT
on error
exit repeat
end try
move message 1 to end of thebox
end repeat

John Delacour introduced us to this method for looping through selected messages but for the simple concept of extracting a line from each message it does in fact make a copy of the messages at the end of the mailbox and causes a doubling of size with a bunch of copies, presumably no longer indexed, at the beginning.

Is there another way to deselect message 1 in order to go to the next message in a loop? Is there a way to create a list of messageID's in a mailbox; in a selection? Is there a way to loop through all messages in a mailbox, selected or not? Is there anything like a message index sequentially assigned with no gaps?

JD's method is the only way that I know of to work with selected messages. This will allow you to loop through a mailbox (selected messages have no impact on this).

tell application "Eudora"
tell mailbox "In" of mail folder ""
set count_ to number of messages
repeat with i from 1 to count_
-- do something to/with message i
end repeat
end tell
end tell

-- Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Eudora AppleScript Question... (Doug McNutt) (From: David Crowe <email@hidden>)
 >Re: Eudora AppleScript Question... (From: Doug McNutt <email@hidden>)
 >Re: Eudora AppleScript Question... (From: Christopher Stone <email@hidden>)
 >repeat loops on Eudora messages (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: Panther Script Menu - being interfered with by ABook and DVD Player
  • Next by Date: Re: rounding integers
  • Previous by thread: repeat loops on Eudora messages
  • Next by thread: Panther Problems - Error type 80 on Mount Volume
  • Index(es):
    • Date
    • Thread