Re: basic calculations in Yojimbo

2007-06-30 Thread Steven Samuels

"marvin droid" <[EMAIL PROTECTED]> sez:


In much of my notetaking there is often a little arithmetic be it
comparative pricing, usage of something, a quick tally etc. I have not
come across any notetakers, scrapbooks, wikis or other PIM that has
this facility. Is there any possibility that this is a feature that
could be incorporated into Yojimbo.


Try CalcService 3.2, described at: http://www.devon-technologies.com/ 
products/freeware/services.html  and

downloadable at: http://www.devon-technologies.com/download/index.html

I just tried it in a Yojimbo Note: typed "1+1", selected it, and the  
result was "1+1=2".  It does not add columns.


NoteTaker (aquaminds.com) has a "Calc" plug-in which does add columns  
of numbers. However the number must be the first item on a line.   
That is:


11Parking
 2Tolls

I use NT to manage all my projects and highly recommend it.
-Steve






--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Re: Pipe Email to Yojimbo

2007-04-17 Thread Steven Samuels

Thank you, Verdon.  I very much appreciate the offer.

Steve
On Apr 17, 2007, at 5:33 AM, Verdon Vaillancourt wrote:

I agree, I'm having a hard time following things. I can provide  
some web-space if Steve would like. Let me know and I'll reply off- 
list if you are interested.


rgds,
verdon



--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Re: Pipe Email to Yojimbo-too many versions

2007-04-16 Thread Steven Samuels
You are right, Sherman, and I apologize. The scripts posted today  
have been essentially identical-they were the "final" versions to me  
(except the one which was a test of the web page version).  They all  
worked if you got them via email. However they did generate errors or  
cause confusion for people who linked to them from Hawkwings.  The  
problems were created by the list web page, which changed a symbol &  
added hard returns, and were compounded by by own hurry (failure to  
remove outdated instructions) and ignorance.  I don't forsee any more  
versions.


Steven


On Apr 16, 2007, at 12:05 PM, Sherman Wilcox wrote:

I'm really beginning to lose track of versions here. Maybe some  
testing, and then some kind of a "final" version until a major  
addition to the script comes along?


On Apr 16, 2007, at 9:56 AM, Steven Samuels wrote:


Version 22


--
Sherman



--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's  
workingcorrectly? Please send mail to: <[EMAIL PROTECTED]>



--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Re: Pipe Email to Yojimbo

2007-04-16 Thread Steven Samuels
Version 23.  In Version 22 left in unnecessary instructions about  
joining lines that had been separated by hard returns. These  
instructions are removed There are no changes in function.


Steve

(*
Script to pipe selected Apple Mail messages to Yojimbo notes

Author: Steve Samuels ([EMAIL PROTECTED])
File: yojimbo23.txt
PipeMailtoYojimbo.scpt

Version:23
Date: 2007/04/16

This script is based on one by Jim Correia of Barebones, cited  
below.  It adds the following information to to the "Comments"  of an  
imported email note.  If the comments Column is visible in Yojimbo's  
Item List Pane, then the information can be viewed without opening  
the note.


* Added to Comments
  1) the date sent (/mm/dd)
  2) the name or address of sender or recipient
  3) the first 60 characters of the message itself it, after  
removing returns, tabs, and most extra spaces.


* Adds tags: "email" & either "in" or "out"

After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.com---Your subscription is up soon. Please  
rene"   (an incoming message)

or
"2007/04/09 >: Sam---Hi, Sam! I can't believe that you won the  
lotte" (an outgoing message)


Notes:

1. Text will not import for some rich text messages with  
attachments.  The date sent, sender & tags are added, but  
AppleScript's "content of message" function returns only variants of  
"??". If this happens, open the original message & cut & paste the  
content into the note created by the script.


2. Graphics are removed and replaced by question marks. If you  wish  
to retain the graphics, import the mail via the "Save PDF to Yojimbo"  
option in Mail's Print window.


3. A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages in the account will be  
classified as incoming. To fix this behavior, create and inactivate a  
dummy account. Only the email address must be correct; the other  
settings are irrelevant.


4. You can reset the number of characters that are added to comments  
from the body of the message. The setting statement appears just  
after the "on run" command at the start of the script proper.


5. If you have selected messages in more than one Message Viewer, the  
script transfers only those from the Viewer that was opened first.


6. Changing the font of Yojimbo's item list may make the the list  
more readable. (I now use Lucinda-Grande Bold 11)


Acknowledgements:

The original form for this script was based on MailtoYojimbo, by Jim  
Correia of Bare Bones Software, posted in the Yojimbo Talk Forum:  
http://www.listsearch.com/Yojimbo/Message/index.lasso?2169

& at //www.hawkwings.net/2006/09/04/script-to-pipe-emails-into-yojimbo/

I got the idea for adding extended message information to the  
comments field after seeing the "Summary" field in SOHO Notes.


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was:
http://www.macresearch.org/no_need_to_parse_an_expression

The form for the shell script was based on examples at:
http://developer.apple.com/technotes/tn2002/tn2065.html
http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html

*)

on run
---
--In the "set _maxcontent" statement below, specify how many characters
--from the message to add to comments. Zero is a possible value.
---
set _maxcontent to 60 as integer
tell application "Yojimbo"
activate
end tell
tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog ¬
"No Viewer Window is Open. Open one & select messages."¬
& return with title "Error"¬
giving up after 3 with icon 0
return
end if
tell message viewer 1
if not (exists selected messages) then
display dialog "No message was selected" ¬
& return & "Transfer cancelled." with title "Error..."¬
giving up after 3 with icon 0
return
end if
set messageList to selected messages
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""
--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing"
else
set _type to "incoming"
end if
set _name to subject of m
set _contents to _contents & my generateMessageText(m)
--Set up date sent
set _date to date sent of m
set _yr to year of _date as string
set _month to month of _date as number
--Force month to format 'mm'
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _smon
end if
--Force day to format 'dd'
set _day to day of _date as string
if day o

Re: Pipe Email to Yojimbo

2007-04-16 Thread Steven Samuels

Version 22

1. The Yojimbo-Talk web page i breaks up long lines with hard  
returns. This caused errors for users who copied previous versions of  
the script from there. To fix this problem, I broke up long lines  
with Applescript continuation characters "¬".  The error did not  
affect anyone who copied the script from their email.


2. The post of Version of 21 had two copies of the script and should  
therefore be replaced.


Steve

(*
Script to pipe selected Apple Mail messages to Yojimbo notes

Author: Steve Samuels ([EMAIL PROTECTED])
File: yojimbo22.txt
PipeMailtoYojimbo.scpt

Version:22
Reformatted to shorter lines
Date: 2007/04/16

This script is based on one by Jim Correia of Barebones, cited  
below.  It adds the following information to to the "Comments"  of an  
imported email note.  If the comments Column is visible in Yojimbo's  
Item List Pane, then the information can be viewed without opening  
the note.



* Added to Comments
  1) the date sent (/mm/dd)
  2) the name or address of sender or recipient
  3) the first 60 characters of the message itself it, after  
removing returns, tabs, and most extra spaces.


* Adds tags: "email" & either "in" or "out"

After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.com---Your subscription is up soon. Please  
rene"   (an incoming message)

or
"2007/04/09 >: Sam---Hi, Sam! I can't believe that you won the  
lotte" (an outgoing message)


Notes:

IMPORTANT: Before inserting the script into script-editor, open it in  
a text editor like BBEdit or Text Wrangler.  Scroll down to a section


1. Text will not import for some rich text messages with  
attachments.  The date sent, sender & tags are added, but  
AppleScript's "content of message" function returns only variants of  
"??". If this happens, open the original message & cut & paste the  
content into the note created by the script.


2. Graphics are removed and replaced by question marks. If you  wish  
to retain the graphics, import the mail via the "Save PDF to Yojimbo"  
option in Mail's Print window.


3. A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages in the account will be  
classified as incoming. To fix this behavior, create and inactivate a  
dummy account. Only the email address must be correct; the other  
settings are irrelevant.


4. You can reset the number of characters that are added to comments  
from the body of the message. The setting statement appears just  
after the "on run" command at the start of the script proper.


5. If you have selected messages in more than one Message Viewer, the  
script transfers only those from the Viewer that was opened first.


6. Changing the font of Yojimbo's item list may make the the list  
more readable. (I now use Lucinda-Grande Bold 11)



Acknowledgements:

The original form for this script was based on MailtoYojimbo, by Jim  
Correia of Bare Bones Software, posted in the Yojimbo Talk Forum:  
http://www.listsearch.com/Yojimbo/Message/index.lasso?2169

& at //www.hawkwings.net/2006/09/04/script-to-pipe-emails-into-yojimbo/

I got the idea for adding extended message information to the  
comments field after seeing the "Summary" field in SOHO Notes.


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was:
http://www.macresearch.org/no_need_to_parse_an_expression

The form for the shell script was based on examples at:
http://developer.apple.com/technotes/tn2002/tn2065.html
http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html

*)

on run
---
--In the "set _maxcontent" statement below, specify how many characters
--from the message to add to comments. Zero is a possible value.
---
set _maxcontent to 60 as integer
tell application "Yojimbo"
activate
end tell
tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog ¬
"No Viewer Window is Open. Open one & select messages."¬
& return with title "Error"¬
giving up after 3 with icon 0
return
end if
tell message viewer 1
if not (exists selected messages) then
display dialog "No message was selected" ¬
& return & "Transfer cancelled." with title "Error..."¬
giving up after 3 with icon 0
return
end if
set messageList to selected messages
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""
--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing"

Re: Pipe Email to Yojimbo

2007-04-16 Thread Steven Samuels
This is a test.  The Yojimbo-Talk web page is breaking up long lines  
with hard returns, so that users who copy the script from there  
experience errors. To try to prevent the problem, I have tried  
breaking up long lines with Applescript continuation characters.


Steve

(*
Script to pipe selected Apple Mail messages to Yojimbo notes

Author: Steve Samuels ([EMAIL PROTECTED])
File: yojimbo22.txt
PipeMailtoYojimbo.scpt

Version:22
Date: 2007/04/16

This script is based on one by Jim Correia of Barebones, cited  
below.  It adds the following information to to the "Comments"  of an  
imported email note.  If the comments Column is visible in Yojimbo's  
Item List Pane, then the information can be viewed without opening  
the note.



* Added to Comments
  1) the date sent (/mm/dd)
  2) the name or address of sender or recipient
  3) the first 60 characters of the message itself it, after  
removing returns, tabs, and most extra spaces.


* Adds tags: "email" & either "in" or "out"

After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.com---Your subscription is up soon. Please  
rene"   (an incoming message)

or
"2007/04/09 >: Sam---Hi, Sam! I can't believe that you won the  
lotte" (an outgoing message)


Notes:

IMPORTANT: Before inserting the script into script-editor, open it in  
a text editor like BBEdit or Text Wrangler.  Scroll down to a section


1. Text will not import for some rich text messages with  
attachments.  The date sent, sender & tags are added, but  
AppleScript's "content of message" function returns only variants of  
"??". If this happens, open the original message & cut & paste the  
content into the note created by the script.


2. Graphics are removed and replaced by question marks. If you  wish  
to retain the graphics, import the mail via the "Save PDF to Yojimbo"  
option in Mail's Print window.


3. A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages in the account will be  
classified as incoming. To fix this behavior, create and inactivate a  
dummy account. Only the email address must be correct; the other  
settings are irrelevant.


4. You can reset the number of characters that are added to comments  
from the body of the message. The setting statement appears just  
after the "on run" command at the start of the script proper.


5. If you have selected messages in more than one Message Viewer, the  
script transfers only those from the Viewer that was opened first.


6. Changing the font of Yojimbo's item list may make the the list  
more readable. (I now use Lucinda-Grande Bold 11)



Acknowledgements:

The original form for this script was based on MailtoYojimbo, by Jim  
Correia of Bare Bones Software, posted in the Yojimbo Talk Forum:  
http://www.listsearch.com/Yojimbo/Message/index.lasso?2169

& at //www.hawkwings.net/2006/09/04/script-to-pipe-emails-into-yojimbo/

I got the idea for adding extended message information to the  
comments field after seeing the "Summary" field in SOHO Notes.


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was:
http://www.macresearch.org/no_need_to_parse_an_expression

The form for the shell script was based on examples at:
http://developer.apple.com/technotes/tn2002/tn2065.html
http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html

*)

on run
---
--In the "set _maxcontent" statement below, specify how many characters
--from the message to add to comments. Zero is a possible value.
---
set _maxcontent to 60 as integer
tell application "Yojimbo"
activate
end tell
tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog ¬
"No Viewer Window is Open. Open one & select messages."¬
& return with title "Error"¬
giving up after 3 with icon 0
return
end if
tell message viewer 1
if not (exists selected messages) then
display dialog "No message was selected" ¬
& return & "Transfer cancelled." with title "Error..."¬
giving up after 3 with icon 0
return
end if
set messageList to selected messages
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""
--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing"
else
set _type to "incoming"
end if
set _name to subject of m
set _contents to _contents & my generateMessageText(m)
--Set up date sent
set _date to date sent of m
set _yr to year of _date as stri

Re: Pipe Email to Yojimbo

2007-04-16 Thread Steven Samuels

Here is version 21.
In the "min(x,y)" function at the end of the script, the "less than  
or equal to" symbol did not translate correctly when it appeared in  
the previous post.  This is now fixed.


Steve

(*
Script to pipe selected Apple Mail messages to Yojimbo notes

Author: Steve Samuels ([EMAIL PROTECTED])
File: yojimbo21.txt
PipeMailtoYojimbo.scpt

Version:21
Date: 2007/04/16

Besides importing messages, the script:

* Adds to message Comments:
  1) the date sent (/mm/dd)
  2) the name or address of sender or recipient
  3) the first 60 characters of the message itself it, after  
removing returns, tabs, and most extra spaces.

* Adds tags: "email" & either "in" or "out"

After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.com---Your subscription is up soon. Please  
rene"   (an incoming message)

or
"2007/04/09 >: Sam---Hi, Sam! I can't believe that you won the  
lotte" (an outgoing message)


Notes:

1. Text will not import for some rich text messages with  
attachments.  The date sent, sender & tags are added, but  
AppleScript's "content of message" function returns only variants of  
"??". If this happens, open the original message & cut & paste the  
content into the note created by the script.


2. Graphics are removed and replaced by question marks. If you  wish  
to retain the graphics, import the mail via the "Save PDF to Yojimbo"  
option in Mail's Print window.


3. A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages in the account will be  
classified as incoming. To fix this behavior, create and inactivate a  
dummy account. Only the email address must be correct; the other  
settings are irrelevant.


4. You can reset the number of characters that are added to comments  
from the body of the message. The setting statement appears just  
after the "on run" command at the start of the script proper.


5. If you have selected messages in more than one Message Viewer, the  
script transfers only those from the Viewer that was opened first.


6. Changing the font of Yojimbo's item list may make the the list  
more readable. (I now use Lucinda-Grande Bold 11)



Acknowledgements:

The original form for this script was based on MailtoYojimbo, by Jim  
Correia of Bare Bones Software, posted in the Yojimbo Talk Forum:  
http://www.listsearch.com/Yojimbo/Message/index.lasso?2169

& at //www.hawkwings.net/2006/09/04/script-to-pipe-emails-into-yojimbo/

I got the idea for adding extended message information to the  
comments field after seeing the "Summary" field in SOHO Notes.


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was:
http://www.macresearch.org/no_need_to_parse_an_expression

The form for the shell script was based on examples at:
http://developer.apple.com/technotes/tn2002/tn2065.html
http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html

*)

on run
---
--In the "set _maxcontent" statement below, specify how many characters
--from the message to add to comments. Zero is a possible value.
---
set _maxcontent to 60 as integer
tell application "Yojimbo"
activate
end tell
tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog "No Viewer Window is Open. Open one & select  
messages." & return with title "Error" giving up after 3 with icon 0

return
end if
tell message viewer 1
if not (exists selected messages) then
display dialog "No message was selected" & return & "Transfer  
cancelled." with title "Error..." giving up after 3 with icon 0

return
end if
set messageList to selected messages
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""
--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing"
else
set _type to "incoming"
end if
set _name to subject of m
set _contents to _contents & my generateMessageText(m)
--Set up date sent
set _date to date sent of m
set _yr to year of _date as string
set _month to month of _date as number
--Force month to format 'mm'
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _smon
end if
--Force day to format 'dd'
set _day to day of _date as string
if day of _date < 10 then
set _day to "0" & _day
end if
-- Create date sent with /mm/dd format
set _datef to _yr & "/" & _smon & "/" & _day
--Get sender's name or address
set _sender to extract name from sender of m
--If there is no na

Re: Pipe Email to Yojimbo Version 17

2007-04-14 Thread Steven Samuels

Here is Version 20.

It's here for two reasons:
1. THERE WAS A SERIOUS ERROR IN THE PREVIOUS VERSION. In removing tab  
characters to format the script for listing in this email, I  
inadvertently removed the tab character in the statement where the  
script removes tabs, spaces, and returns.  In this version I have  
included the REGEX symbols for tab "\t" and return "\r.  When you  
compile the script, these will convert to invisible tabs and returns.


2. The previous version left spaces for each return character  
removed. If there were several returns, there were several spaces.  
This has been fixed so that there is only one space at most between  
words.


_Script Starts below this line_

(*
Script to pipe selected Apple Mail messages to Yojimbo notes

Author: Steve Samuels ([EMAIL PROTECTED])
File: yojimbo20.txt
PipeMailtoYojimbo.scpt

Version:20
Date: 2007/04/13

Besides importing messages, the script:

* Adds to message Comments:
  1) the date sent (/mm/dd)
  2) the name or address of sender or recipient
  3) the first 60 characters of the message itself it, after  
removing returns, tabs, and most extra spaces.

* Adds tags: "email" & either "in" or "out"

After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.com---Your subscription is up soon. Please  
rene"   (an incoming message)

or
"2007/04/09 >: Sam---Hi, Sam! I can't believe that you won the  
lotte" (an outgoing message)


Notes:

1. Text will not import for some rich text messages with  
attachments.  The date sent, sender & tags are added, but  
AppleScript's "content of message" function returns only variants of  
"??". If this happens, open the original message & cut & paste the  
content into the note created by the script.


2. Graphics are removed and replaced by question marks. If you  wish  
to retain the graphics, import the mail via the "Save PDF to Yojimbo"  
option in Mail's Print window.


3. A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages in the account will be  
classified as incoming. To fix this behavior, create and inactivate a  
dummy account. Only the email address must be correct; the other  
settings are irrelevant.


4. You can reset the number of characters that are added to comments  
from the body of the message. The setting statement appears just  
after the "on run" command at the start of the script proper.


5. If you have selected messages in more than one Message Viewer, the  
script transfers only those from the Viewer that was opened first.


6. Changing the font of Yojimbo's item list may make the the list  
more readable. (I now use Lucinda-Grande Bold 11)


7. The number of characters added can be reset in Script Editor.  See  
the "set _maxcontent" statement which occurs at the start of the  
script proper.


Acknowledgements:

The original form for this script was based on MailtoYojimbo, by Jim  
Correia of Bare Bones Software, posted in the Yojimbo Talk Forum:  
http://www.listsearch.com/Yojimbo/Message/index.lasso?2169

& at //www.hawkwings.net/2006/09/04/script-to-pipe-emails-into-yojimbo/

I got the idea for adding extended message information to the  
comments field after seeing the "Summary" field in SOHO Notes.


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was:
http://www.macresearch.org/no_need_to_parse_an_expression

The form for the shell script was based on examples at:
http://developer.apple.com/technotes/tn2002/tn2065.html
http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html

*)

on run
---
--In the "set _maxcontent" statement below, specify how many characters
--from the message to add to comments. Zero is a possible value.
---
set _maxcontent to 60 as integer
tell application "Yojimbo"
activate
end tell
tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog "No Viewer Window is Open. Open one & select  
messages." & return with title "Error" giving up after 3 with icon 0

return
end if
tell message viewer 1
if not (exists selected messages) then
display dialog "No message was selected" & return & "Transfer  
cancelled." with title "Error..." giving up after 3 with icon 0

return
end if
set messageList to selected messages
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""
--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing

Re: Pipe Mail to Yojimbo V 17

2007-04-13 Thread Steven Samuels
I overlooked the best way to get the content of the problem  messages  
into Yojimbo.  Copy & paste the content from  Mail into the note that  
was created by the script.  The date, sender and tags have already  
been added, and you can add message text to the comments, if you wish.


Steve

On Apr 13, 2007, at 12:16 PM, Steven Samuels wrote:


There are two main reasons for this revision:

* To alert users that text will not import for some rich text  
messages with attachments. In these cases, AppleScript's "content  
of message" operator returns only variants of "??". The suggested  
work-around is to forward the message to yourself after deleting  
the attachments.



--
--
This message is sent to you because you are subscribed to
 the mailing list <[EMAIL PROTECTED]>.
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Pipe Mail to Yojimbo V 17

2007-04-13 Thread Steven Samuels

There are two main reasons for this revision:

* To alert users that text will not import for some rich text  
messages with attachments. In these cases, AppleScript's "content of  
message" operator returns only variants of "??". The suggested work- 
around is to forward the message to yourself after deleting the  
attachments.


* Version 16 gave an uninformative Applescript Error Message if no  
messages were selected.  This has been fixed.


Other changes:
* The name-content separator in Comments is changed form "___" to  
"---".  This, to my eye at least, makes the Comments line more readable.

* Some typos are corrected and the code is tweaked.
* The notes are revised. Please read them.


Script Follows below next line:
 
__

(*
enhanced script to pipe selected Apple Mail messages to Yojimbo notes

Author: Steve Samuels ([EMAIL PROTECTED])
File: yojimbo17.txt
PipeMailtoYojimbo.scpt

Version : 17
Date: 2007/04/13

Besides importing messages, the script:

* Adds to message Comments:
1) the date sent (/mm/dd)
2) the name or address of sender or recipient
3) the first 60 characters of the message itself it, after removing  
returns, tabs, and most extra spaces.

(The number of characters can be reset in Script Editor.)
* Adds tags: "email" & either "in" or "out"
After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.com _Your subscription is up soon. Please  
rene"   (an incoming message)

or
"2007/04/09 >: Sam _I can't believe that you won the  
lottery"(an outgoing message)



*
MAJOR ISSUE: THE MESSAGES OF CERTAIN RICH TEXT DOCUMENTS WITH  
ATTACHMENTS WILL NOT IMPORT. THE MESSAGE CONTENT WILL SHOW AS "???"  
OR SOMETHING LIKE IT. IF THIS OCCURS, FORWARD THE MESSAGE TO YOURSELF  
WITHOUT ATTACHMENTS.

*
Notes:

1. Graphics are removed and shown as question marks, e.g. "??"

2. A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages in the account will be  
classified as incoming. To fix this behavior, create and inactivate a  
dummy account. Only the email address must be correct; the other  
settings are irrelevant.


3. You can reset the number of characters that are added to comments  
from the body of the message. The setting statement appears just  
after the "on run" command at the start of the script proper. Zero is  
a possible entry.


4. If you have selected messages in more than one Message Viewer, the  
script transfers only those from the Viewer that was opened first.


5. Changing the font of Yojimbo's item list may make the the list  
more readable. (I now use Lucinda-Grande Bold 11)


.
Credits:

Based on MailtoYojimbo Applescript by Jim Correia of Bare Bones Software
Originally posted in the Yojimbo Talk Forum: http:// 
www.listsearch.com/Yojimbo/Message/index.lasso?2169

& at //www.hawkwings.net/2006/09/04/script-to-pipe-emails-into-yojimbo/

The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was:
http://www.macresearch.org/no_need_to_parse_an_expression

The form for the shell script was based on examples at:
http://developer.apple.com/technotes/tn2002/tn2065.html
http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html



*)

on run
--SPECIFY HOW HOW MUCH OF THE MESSAGE TO ADD TO COMMENTS. IF NONE,  
SET THE NUMBER TO ZERO

set _maxcontent to 60 as integer
tell application "Yojimbo"
activate
end tell
tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog "No Viewer Window is Open. Open one & select  
messages." & return with title "Error" giving up after 3 with icon 0

return
end if
tell message viewer 1
if not (exists selected messages) then
display dialog "No message was selected" & return & "Transfer  
cancelled." with title "Error..." giving up after 3 with icon 0

return
end if
set messageList to selected messages
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""
--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing"
else
set _type to "incoming"
end if
set _name to subject of m
set _contents to _contents & my generateMessageText(m)
--Set up date sent
set _date to date sent of m
set _yr to year of _date as string
set _month to month of _date as number
--Force month to format 'mm'
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _smon
end if
--Force day to

Pipe Email to Yojimbo Version 16

2007-04-12 Thread Steven Samuels
Here is Version 16.  The major change is that part of the message  
text can now be added to Comments.  To make it easier for the user to  
get at the statement where the number of characters added is set, I  
have moved all the function routines to the end of the script.



Script follows next line
_

(* Script to pipe selected Apple Mail messages to Yojimbo notes
Version 16
  2007/04/12
This script will:
1. Pipe selected selected messages from Apple Mail to Yojimbo notes.
2. Put the date sent (/mm/dd) & name or address of sender or  
recipient into Comments.
3. Add the first 60 characters (user changeable) of the message to  
Comments after removing returns, tabs, and most extra spaces.

4. Add tags "email" and either "in" or "out" to each note.

After running the script, a Comment will look something like:

"2007/04/08 <: NYTimes.comYour subscription is up soon.   
Please ren"   (an incoming message)

or
"2007/04/09 >: SamI can't believe that you won the  
lottery" (an outgoing message)



Notes:

1) A message is classified as outgoing if the sender's address  
matches one of the user's addresses. If an account has been deleted,  
there is no address to match, and all messages are classified as  
incoming.  To fix this behavior, create and  inactivate a dummy  
account. Only the email address must be correct; the other settings  
are irrelevant.


2) As the notes are text, graphics do not display, but they sometimes  
show as "?".


3) One space will be left for every return or new line.

4)  You can  reset he number of characters that are added from the  
body of the message (_maxcontent). The setting statement appears just  
after the "on run" command at the start of the script.




Credits:

Based on MailtoYojimbo Applescript by Jim Correia of Bare Bones Software
Originally posted in the Yojimbo Talk Forum: http:// 
www.listsearch.com/Yojimbo/Message/index.lasso?2169


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support


The source for the minimum function was: http://www.macresearch.org/ 
no_need_to_parse_an_expression


The form for the shell script & Perl commands were guessed from
   http://developer.apple.com/technotes/tn2002/tn2065.html
   http://developer.apple.com/documentation/OpenSource/Conceptual/ 
ShellScripting/RegularExpressionsUnfettered/chapter_6_section_9.html



   Steve Samuels
   [EMAIL PROTECTED]
*)


on run
--SPECIFY HOW HOW MUCH OF THE MESSAGE TO ADD COMMENTS. IF YOU WANT  
NONE, CHANGE THE VALUE BELOW TO ZERO.

--IF YOU DON'T WANT ANY, SET THE LENGTH TO 0
set _maxcontent to 60 as integer

tell application "Yojimbo"
activate
end tell

tell application "Mail"
activate
if not (exists message viewer 1) then
display dialog "No Viewer Window is Open. Open one & select  
messages." & return with title "Error" giving up after 3 with icon 0

return
end if

tell message viewer 1
set messageList to selected messages
if not (exists selected messages) then
display dialog "No message was selected" & return & "Transfer  
cancelled." with title "Error..." giving up after 3 with icon 0

return
end if
--Now loop through messages
repeat with m in messageList
--Initialize
set _type to ""
set _contents to ""
set _name to ""
set _person to ""
set _tag to ""
set _body to ""

--Classify message as incoming or outgoing
set _count to my CountSent(m) as integer
if _count is 1 then
set _type to "outgoing"
else
set _type to "incoming"
end if

set _name to subject of m


set _contents to _contents & my generateMessageText(m)

--Set up date sent
set _date to date sent of m
set _yr to year of _date as string
set _month to month of _date as number

--Force month to format 'mm'
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _smon
end if

--Force day to format 'dd'
set _day to day of _date as string
if day of _date < 10 then
set _day to "0" & _day
end if

-- Create date sent  with /mm/dd format
set _datef to _yr & "/" & _smon & "/" & _day

--Get sender's name or address
set _sender to extract name from sender of m
--If there is no name, _sender defaults to the address

--If the message was received, set the name to the  sender
-- and set a tag variable to "in"
if _type is "incoming" then
set _person to "<: " & _sender
set _tag to "in" as string
end if

--If the message was sent, get the first recipient's name, if  
available, otherwise the address

if _type is "outgoing" then
set theRecipients to to recipients of m
if (exists name of item 1 of theRecipients) then
set _person to ">: " & name of item 1 of theRecipients
else
set _person to ">: " & address of item 1 of theRecipients
end if
set _tag to "out" as string
end if

--now get the first 60 characters of the message content or the whole  
if fewer than 60

set _body to ""
set _body to _body & my genbody(m) as text
set _length to 

Re: Pipe messages to Gyazmail?

2007-04-09 Thread Steven Samuels


Harvey:  Just to be clearer.  To adapt the pipe script to GyazMail  
you need to be able to get the following via Applescript:

1. Name/address of Sender
2. Name/address of the first Recipient
3. Date Sent
4. Content of the message
5. An object which contains the selected messages

To decide if a message is outgoing or incoming, you can han code your  
own email addresses into the script and compare them to the sender's  
address one at a time. (That's how I did it originally).


Good luck!  Let us know what you find out.

Steve


On Apr 9, 2007, at 4:03 PM, Harvey S. Leff wrote:
Can the Applescript be modified to work with another email  
program?. I switched to GyazMail





--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Need Help with Script to Pipe email to Yojimbo

2007-04-09 Thread Steven Samuels
I think it would be useful to add the first 50 or so characters of  
the body of email to the Comments. This is probably enough to get a  
good idea of the content of a message without viewing it.  I got the  
idea from SOHO Notes, which implements it poorly for email.


The body of the email message is the Applescript variable "content"  
of message or, in the script, "content of m".


For the comments to be compact, returns and multiple spaces would  be  
converted to single spaces. Then the first 50 characters would  be  
extracted. I know how to do this with a Regular Expression processor,  
but I don't know how to do it in Applescript. Can anyone help with  
the necessary code?


Thanks,

Steve

--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Re: Pipe messages to Gyazmail?

2007-04-09 Thread Steven Samuels
I know nothing about GyazMail. After a quick online search and a  
visit to the developer's web site, I would guess that the current  
answer to your question is "No,"  Open the scripting dictionary for  
GyazMail, available via the File menu in Script Editor.  Do you see  
elements similar to those that I used in "Pipe" script?  If not, you  
are out of luck, at least for now. The developers state that more  
Applescript support is planned for the future. Why not let them know  
what you would like to have?


Steve


On Apr 9, 2007, at 4:03 PM, Harvey S. Leff wrote:

e
Can the Applescript be modified to work with another email program?  
I stopped using Apple Mail years ago after I found a bug in its  
search utility that caused me to NOT find an important existing  
message when I badly needed it. I switched to GyazMail



--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Script to pipe multiple Mail messages to Yojimbo with date, names,tags

2007-04-08 Thread Steven Samuels
I've completely re-organized the script. Now it will pipe multiple  
selected messages. I apologize for the multiple posts. Unless someone  
finds a mistake, this is the last version.


Steve

Script Follows the next line:
 
_


(*
This script will:

1. Pipe selected messages from Apple Mail to Yojimbo notes
2. Put the date sent (/mm/dd) & name or address of sender or  
recipient into Comments

4. Add tags "email" and either "in" or "out"

After running the script, The Comments  will look like:

2007/04/08 <: NYTimes.com  (an incoming message)
or
2007/04/09 >: Sam  (an outgoing message)

Sorting on the Comments column will sort on date order.

Note:  If an account has been deleted, all messages to and from it  
will be classified & tagged as incoming. To restore the proper  
classification, create a dummy version of the account and disable it.  
Only the email address need  be correct; the server settings are  
irrelevant.


Credits:
Based on MailtoYojimbo Applescript by Jim Correia of Bare Bones Software
Originally posted in the Yojimbo Talk Forum: http:// 
www.listsearch.com/Yojimbo/Message/index.lasso?2169


The error dialog was copied from MailToYojimbo-v1.1 by Drummond  
Field, posted at:
http://www.hawkwings.net/2007/02/05/email-to-yojimbo-script-with-pdf- 
support

(Drummonds very nice script will prompt for tags.)

Steve Samuels
[EMAIL PROTECTED]
Version 11
2007/04/08
*)

--Set up a function to generate the body of the message

on generateMessageText(m)
tell application "Mail"
set _sender to sender of m
set _subject to subject of m
set _date to date received of m as string
set _contents to content of m
set _messageString to "From: " & _sender & return
set _messageString to _messageString & "Subject: " & _subject & return
set _messageString to _messageString & "Date: " & _date & return
set _messageString to _messageString & return & return & _contents
end tell

end generateMessageText

--Set a second function to pass a variable which indicates whether I  
sent the message or not

--
on CountSent(m)
tell application "Mail"
set _ctsent to 0 as integer
repeat with _acct in accounts
set _sender to sender of m
set _sx to extract address from _sender
if email addresses of _acct contains _sx then
set _ctsent to _ctsent + 1 as integer
-- _ctsent counts the number of times the sender's address matches  
one of mine

-- At the end of the function, the value of _ctsent will be 0 or 1
end if
end repeat
end tell
return _ctsent
end CountSent


--Main Program
on run
tell application "Mail"
tell message viewer 1
set messageList to selected messages
if not (exists selected messages) then
display dialog "No message was selected" & return & "Transfer  
cancelled." with title "Error..." giving up after 3 with icon 0  
buttons {"Ok"}

return
end if
--Now loop through messages
repeat with m in messageList
set _contents to ""
set _date to ""
set _sender to ""
--Classify message as incoming or outgoing
if my CountSent(m) is 1 then
set _type to "outgoing"
end if
if my CountSent(m) is 0 then
set _type to "incoming"
end if

set _name to subject of m
set _contents to _contents & my generateMessageText(m)

--Set up date sent
set _date to date sent of m
set _yr to year of _date as string
set _month to month of _date as number

--Force month to format 'mm'
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _smon
end if

--Force day to format 'dd'
set _day to day of _date as string
if day of _date < 10 then
set _day to "0" & _day
end if

-- Create date sent  with /mm/dd format
set _datef to _yr & "/" & _smon & "/" & _day

--Get sender's name & address
set _sender to sender of m
set _ssender to extract name from _sender
--If there is no name, _ssender defaults to the address
set _saddr to extract address from _sender

--If the message was received, set the name to the  sender and  a tag  
to "in"

if _type is "incoming" then
set _person to "<: " & _ssender
set _tag to "in" as string
end if

--If the message was sent, get the first recipient's name, if  
available, otherwise the address

if _type is "outgoing" then
set theRecipients to to recipients of m
if (exists name of item 1 of theRecipients) then
set _pers to name of item 1 of theRecipients
set _person to ">: " & _pers
else
set _addr to address of item 1 of theRecipients
set _person to ">: " & _addr
end if
set _tag to "out" as string
end if

---Now set up the note with body, comments, and tags
tell application "Yojimbo"
set aNewNoteItem to make new note item with properties  
{contents:_contents, name:_name, comments:_datef & " " & _person}

add tags {"email", _tag} to aNewNoteItem
end tell

end repeat
end tell
end tell
end run


--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List arch

Improved script to pipe mail to Yojimbo with date,names,tags

2007-04-07 Thread Steven Samuels
Here's an improved version of the script I just sent.  This version  
doesn't require any manual entries by the user.  The only ambiguity I  
see (I'm sure  there are more) is that if you send an email to a  
mailing list which then receive it as a member of the list, it will  
be classified as sent not received.



Steve

(* Script to
1. pipe a single selected email message from Apple Mail to a Yojimbo  
note
2. Add to comments:   date sent (/mm/dd), day of week  
sent ,recipient or sender

3. Add tags "email" and either "in" or "out" to the entry

Acknowledgement:  Based on MailtoYojimbo Applescript by Jim Correia  
of Bare Bones Software  Originally posted in the Yojimbo Talk Forum:  
http://www.listsearch.com/Yojimbo/Message/index.lasso?2169
Also at://www.hawkwings.net/2006/09/04/script-to-pipe-emails-into- 
yojimbo/


   Steve Samuels
*)

on generateMessageText(m)
tell application "Mail"
set _sender to sender of m
set _subject to subject of m
set _date to date received of m as string
set _contents to content of m
set _messageString to "From: " & _sender & return
set _messageString to _messageString & "Subject: " & _subject & return
set _messageString to _messageString & "Date: " & _date & return
set _messageString to _messageString & return & return & _contents
end tell

end generateMessageText

on run
tell application "Mail"
tell message viewer 1
set messageList to selected messages
set _name to subject of item 1 of messageList
set _contents to ""

--Get content
repeat with m in messageList
set _contents to _contents & my generateMessageText(m)
end repeat

--Get date sent
set _date to date sent of item 1 of messageList
set _yr to year of _date as string
set _month to month of _date
-- Coerce month to number
set _month to _month + 0
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _month
end if

set _day to day of _date as string
if day of _date < 10 then
set _day to "0" & _day
end if
-- Create date with /mm/dd format
set _ldate to _yr & "/" & _smon & "/" & _day & " "

--Get sender
set _sender to sender of item 1 of messageList
set _ssender to extract name from _sender
set _person to "<:" & _ssender

--Check if sender is me.
set _from_me to false
set _saddr to extract address from _sender

end tell

--Find if the sender matches one of my email addresses
repeat with _acct in accounts
if email addresses of _acct contains _saddr then
set _from_me to true
end if
end repeat
_from_me

-- If message was received, set up note with tags "mail" & "in".
if _from_me is false then
tell application "Yojimbo"
set aNewNoteItem to make new note item with properties  
{contents:_contents, name:_name, comments:_ldate & _person}

add tags {"email", "in"} to aNewNoteItem
end tell

--If mail was sent,  get first recipient. If there is no name, use  
the address.

else
set theRecipients to to recipients of item 1 of messageList
if (exists name of item 1 of theRecipients) then
set _pers to name of item 1 of theRecipients
set _person to ">:" & _pers
else
set _addr to address of item 1 of theRecipients
set _person to ">:" & _addr
end if
-- Set up note with tags "mail" & "out"
tell application "Yojimbo"
set aNewNoteItem to make new note item with properties  
{contents:_contents, name:_name, comments:_ldate & _person}

add tags {"email", "out"} to aNewNoteItem
end tell
end if
end tell
end run

--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>


Script to send email to Yojimbo with date, sender-receiver, and tags

2007-04-06 Thread Steven Samuels
Here is a script which enhances Jim Correia's "MailtoYojimbo"  
applescript. In addition to sending the email, it will add to  
Yojimbo's Comments the date a message was sent and the recipient or  
sender, as appropriate.  In addition it adds tags "email" and one of  
"in" or "out" to the message. Messages can be sorted by date by  
sorting on the comment field.  It works in Mail 2.1 and Yojimbo 1.4.2  
under OS X 10.4.8.


Steve

Script follows:
(* Script to
1. pipe a single selected email message from Apple Mail to Yojimbo
2. Add to comments:   date sent (/mm/dd), sender (for emails  
received) or recipient (for emails sent)
3. Add tags "email" and either "in" or "out" to indicate received or  
sent mail.


Important: to determine if you sent or received the message, specify  
all your email addresses in the section with comment starting "ENTER  
YOUR EMAIL ADDRESS AS SHOWN"


 Based on MailtoYojimbo Applescript by Jim Correia of Bare Bones  
Software
 Originally posted in the Yojimbo Talk Forum: http:// 
www.listsearch.com/Yojimbo/Message/index.lasso?2169
 Also at://www.hawkwings.net/2006/09/04/script-to-pipe-emails-into- 
yojimbo/


   Steve Samuels
   [EMAIL PROTECTED]
*)

on generateMessageText(m)
tell application "Mail"
set _sender to sender of m
set _subject to subject of m
set _date to date received of m as string
set _contents to content of m
set _messageString to "From: " & _sender & return
set _messageString to _messageString & "Subject: " & _subject & return
set _messageString to _messageString & "Date: " & _date & return
set _messageString to _messageString & return & return & _contents
end tell

end generateMessageText

on run
tell application "Mail"
tell message viewer 1
set messageList to selected messages
set _name to subject of item 1 of messageList
set _contents to ""

--get content
repeat with m in messageList
set _contents to _contents & my generateMessageText(m)
end repeat

--get date sent
set _date to date sent of item 1 of messageList
set _year to year of _date
set _yr to _year as string
set _month to month of _date
-- coerce month to number
set _month to _month + 0
set _smon to _month as string
if _month < 10 then
set _smon to "0" & _month
end if

set _day to day of _date as string
if day of _date < 10 then
set _day to "0" & _day
end if
set _ldate to _yr & "/" & _smon & "/" & _day & " "
--get sender
set _sender to sender of item 1 of messageList
set _ssender to extract name from _sender
set _person to "<:" & _ssender


set _from_me to false
set _saddr to extract address from _sender

-
--ENTER YOUR EMAIL ADDRESS AS SHOWN

if _saddr is "[EMAIL PROTECTED]" then
set _from_me to true

--Enter additional email addresses by removing the comment dashes and  
repeating the next two lines for each

--else if _saddr is "[EMAIL PROTECTED]" then
--set _from_me to true
end if

--if mail is from me get first recipient
if _from_me is true then
set theRecipients to to recipients of item 1 of messageList
if (exists name of item 1 of theRecipients) then
set _pers to name of item 1 of theRecipients
set _person to ">:" & _pers
end if
if not (exists name of item 1 of theRecipients) then
set _addr to address of item 1 of theRecipients
set _person to ">:" & _addr

end if
tell application "Yojimbo"
set aNewNoteItem to make new note item with properties  
{contents:_contents, name:_name, comments:_ldate & _person}

add tags {"email", "out"} to aNewNoteItem
end tell
else
tell application "Yojimbo"
set aNewNoteItem to make new note item with properties  
{contents:_contents, name:_name, comments:_ldate & _person}

add tags {"email", "in"} to aNewNoteItem
end tell
end if
end tell
end tell
end run

--
--
This message is sent to you because you are subscribed to
 the mailing list .
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives:  
Have a feature request, or not sure if the software's working 
correctly? Please send mail to: <[EMAIL PROTECTED]>