• 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: Eudora Help, Please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eudora Help, Please


  • Subject: Re: Eudora Help, Please
  • From: Marconi <email@hidden>
  • Date: Sat, 12 Jul 2003 16:54:00 -0700

At 10:30 PM +0100 7/12/03, John Delacour wrote:
>At 11:16 am -0700 12/7/03, Marconi wrote:
>
>>tell application "Eudora"
>> open a text document
>> set spamlist to selection
>> set HowMany to count of messages in spamlist
>> repeat with thismessage from 1 to HowMany
>> set show all headers to true
>> set ReceivedLine to text of (get field "Received: from")
>> Paste ReceivedLine into text document -- followed by a newline
>> end repeat -- move on to next message
>>end tell
>>
>>I hope it's clear what I'm trying to do... Can anyone guide me to the correct syntax?
>
>
>This script will work for a selection in the In mailbox, which must be frontmost. If you want it to work with other mailboxes, it needs some modification.

It will always be the mailbox named "Spam."

>
>I'm presuming you're running OS X.

Yup.

>
>
>set d to "1/1"
>set _doc to "eu" & (current date) - (get date d) & ".txt"
>set fU to "/tmp/" & _doc

Any reason I couldn't create this file elsewhere? Like in my own home directory?

>set f to POSIX file fU
>open for access f with write permission
>set eof f to 0
>write return to f
>close access f
>set my text item delimiters to return & return
>set _headerlist to {}
>tell application "Eudora"
> repeat
> try
> set m to a reference to message ""
> set s to whole text of m
> set end of _headerlist to text item 1 of s
> move m to end of mailbox ":In"

Ummm, what does moving m accomplish?

> on error e
> exit repeat
> end try
> end repeat
> open {f}
>end tell
>set my text item delimiters to ""
>repeat with h in _headerlist
> set _lines to paragraphs of h
> repeat with _line in _lines
> if _line begins with "Received: from" then
> tell application "Eudora"
> set selected text to _line & return
> end tell

And when do we write this line to fu?

> end if
> end repeat
>end repeat

I appreciate the help very much, but I'm trying to understand and learn too.

Also, I don't see where this limits itself to just the selected messages in the mailbox. Is message "" something special? (Actually, when run, I'll be doing the whole "Spam" mailbox. I wanted to limit it to just the selection while coding and testing the script -- to minimize damage from things gone awry as I debug.)

Thanks muchly.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Eudora Help, Please
      • From: John Delacour <email@hidden>
References: 
 >Eudora Help, Please (From: Marconi <email@hidden>)
 >Re: Eudora Help, Please (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Eudora Help, Please
  • Next by Date: Re: Eudora Help, Please
  • Previous by thread: Re: Eudora Help, Please
  • Next by thread: Re: Eudora Help, Please
  • Index(es):
    • Date
    • Thread