• 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: Netscape messenger subjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Netscape messenger subjects


  • Subject: Re: Netscape messenger subjects
  • From: "Marc K. Myers" <email@hidden>
  • Date: Mon, 12 Feb 2001 18:28:44 -0500
  • Organization: [very little]

> Date: Mon, 12 Feb 2001 13:48:52 -0500
> From: Dan Kabbes <email@hidden>
> Reply-To: email@hidden
> To: applescript-users <email@hidden>
> Subject: Netscape messenger subjects
>
> Hello;
>
> I am very new to scripting and am trying to get a list of selected
> messages (or all messages if this is not possible) in the inbox (or any
> mail folder) and create a list of the subjects of those messages. I am
> doing this to create a list of order numbers (subject is the order
> number) so that the receiver can do some order status checks for
> work-tracking. I will then print the list in another application (STE,
> Quark, ...)
>
> I am not even able to get a count of the messages selected or of the
> total messages in the folder. I have not found anything in the
> dictionary which mentions a message as an object.
>
> Before running, I have the messenger window open to the inbox folder.
> There are currently 10 messages in the inbox.
>
> tell application "Netscape Communicator"
> activate
> select window 1
> get the count of messages in the selection
> end tell
>
> --> 0
>
> Everything compiles correclty and even runs, but always returns a result
> of "0"
> I have looked at several websites including Netscapes, but it most
> scripting seems to be focused on URL's and other browsing functions.
> Does anyone know of a way to get a list of emails?

I don't think you'll be able to do this in Netscape itself because it
simply doesn't have the AppleScript commands to accomplish the task. It
would be fairly simple to search a mail folder file using a scriptable
text editor and extract a list of all the subjects. With Text-Edit Plus
you'd do it like this:

set mailFile to (choose file with prompt "Pick a mail folder file")
tell application "Tex-Edit Plus"
activate
open mailFile
make new window at before window 1
tell window 2
set foundIt to (search looking for "Subject: ^*^c" with cases matching)
repeat until foundIt is false
set theText to the selection
set theText to text 10 thru -1 of theText
tell me to writeFile(theText)
set foundIt to (search finding next)
end repeat
end tell
end tell

on writeFile(theText)
tell window 1 of application "Tex-Edit Plus"
copy theText to after the contents
end tell
end writeFile

This script runs very quickly when run from TE+'s script menu; not as
fast when run from Script Editor or as an Applet.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[2/12/01 6:28:32 PM]


  • Prev by Date: Out of Memory
  • Next by Date: Scripting problem/question
  • Previous by thread: Netscape messenger subjects
  • Next by thread: Re: Netscape messenger subjects
  • Index(es):
    • Date
    • Thread