FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Applescript to count certain things in a mail folder.

 
   Mac (Home) -> Apple Scripts RSS
Related Topics:
create account in mail.app using applescript - Hi has anyone been able to script the setup of accounts in apple mail using ? Here's what I'm trying: tell make new imap account with {server

update applescript - I am only now practiced enough in that some anomalies in the language are bugging me. In looking for one of the first documents I read was the Apple web page listing all the bugs in version 1.9.1. I have version 1.9.1 on osx..

Please help with this applescript code - The line below is part of an macro that works fine for documents to RTF format. Can anyone please tell me how I amend this line of code to save documents in ASC (Ascii) text format. (ASC is one of the 'Save As'..

Help with a BBEdit AppleScript - I need to insert Quark tags into a text file that is exported from a ads I just can't seem to get the syntax right to have a font tag inserted at the beginning of the line before the date tag. For

New AppleScript features in 10.5 - On this page (which is formatted in a very un-Apple manner) there's a list of the new features in with each on a clickable link. Some look and I don't want to torpedo any fun so I..
Next:  Apple Scripts: word 2008 script questions  
Author Message
lavachickie

External


Since: Jul 20, 2008
Posts: 4



(Msg. 1) Posted: Sun Jul 20, 2008 4:17 pm
Post subject: Applescript to count certain things in a mail folder.
Archived from groups: alt>comp>lang>applescript (more info?)

I was turned into Applescript a bit ago for another mail related task.
I've tinkered a bit but my skills are really weak and I'm hung up on
this simple todo I need...

I have a folder full of old old messages that were form page
submissions. I want to loop through that entire folder and for each
message there grab two lines... one begins with "organization" and the
other is "name". I want those items saved to a text file (or even the
clip board) comma separated, one line for each message that its gone
through.

I've tinkered and can't get it to do ANYTHING... and it doesn't give
useful errors like I'm used to, it just doesn't DO anything. =-)

Anyone want to take a whack at this?

Amy
Back to top
Login to vote
Michelle Steiner

External


Since: Aug 30, 2005
Posts: 804



(Msg. 2) Posted: Sun Jul 20, 2008 4:35 pm
Post subject: Re: Applescript to count certain things in a mail folder. [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
lavachickie

External


Since: Jul 20, 2008
Posts: 4



(Msg. 3) Posted: Sun Jul 20, 2008 4:47 pm
Post subject: Re: Applescript to count certain things in a mail folder. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You're so right. Here it is. As you can see I can't even begin to
figure out how to scan through the message text and locate the lines I
need, and then sort the label from the value I want. The comments left
in are remnants of my pseudocode.

(*
script to grab the necessary values from the old survey data found in
a folder
*)
set theMessages to {}
set tmpData to ""
set theDataText to ""

tell application "Mail"
set theMessages to the selection
repeat with i from 1 to the number of items in theMessages
(* !! locate the line that begins "Organization Name:" and snatch
all text from beyond that to the end of the line, stick it in tmpData
*)
set tmpData to tmpData + ", " (* adding delimiter *)
(* !! locate the line that begins w/ "Voter's IP:" and snatch all
text from beyond that to the end of the line and likewise stick it in
tmpData*)
set theDataText to theDataText & {tmpData} & "
" (* adding newline to the file for the next time*)
end repeat

set AppleScript's text item delimiters to ""
set theDataText2 to theDataText as text
set the clipboard to theDataText2
end tell
Back to top
Login to vote
Michelle Steiner

External


Since: Aug 30, 2005
Posts: 804



(Msg. 4) Posted: Sun Jul 20, 2008 5:14 pm
Post subject: Re: Applescript to count certain things in a mail folder. [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
lavachickie

External


Since: Jul 20, 2008
Posts: 4



(Msg. 5) Posted: Sun Jul 20, 2008 5:39 pm
Post subject: Re: Applescript to count certain things in a mail folder. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

>
> There isn't enough there to critique. You haven't shown how you access
> the message, for one thing.

Indeed; that's because the ten dozen things I've tried have not
worked.
Back to top
Login to vote
Michelle Steiner

External


Since: Aug 30, 2005
Posts: 804



(Msg. 6) Posted: Sun Jul 20, 2008 6:32 pm
Post subject: Re: Applescript to count certain things in a mail folder. [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Display posts from previous:   
       Mac (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact