Search the web
Sign In
New User? Sign Up
todotxt · Todo.txt
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Apple Script for Mail.app   Message List  
Reply | Forward Message #513 of 2423 |
Re: [todotxt] Apple Script for Mail.app

Ok, I made a second version of this. The original I'm using to key messages from other people. This one is for messages just from me. I created a rule that took the subject (in this case darado) for any message. It then ran the following script. 

Applescript:
(*
add a mail message to todo.txt  --- place in your ~/library/scripts
*)
using terms from application "Mail"
on perform mail action with messages selectedMsgs
tell application "Mail"
repeat with msg in selectedMsgs
set theContent to content of msg
set theSender to extract name from sender of msg
set toText to "@mail @takeaction @" & theSender & "@" & theContent
tell application "Terminal"
do script "/your/path/to/todo.sh  add \"" & toText & "\""
end tell
end repeat
end tell
end perform mail action with messages
end using terms from

You could make the toText line run the command and take the "add" out of the script. But I know I'm just using mine to add todos, not delete or archive.

-Dara

On Aug 2, 2006, at 10:18 PM, Dara Pressley wrote:

Ok, so I know that Gina is working on a email portion for todo.sh but here is something in the mean time for Mail.app users.


It's a first stab and very rough, but it lets me mark my emails and send them to todo.txt. I use Act-on (http://www.indev.ca/MailActOn.html) to run the command  as I read each message, but it can be assigned as a general rule for anything. You can even set a rule for anything you email to yourself and have it run the script.

Applescript:
(*
add a mail message to todo.txt  --- place in your ~/library/scripts
*)
using terms from application "Mail"
on perform mail action with messages selectedMsgs
tell application "Mail"


repeat with msg in selectedMsgs
set theSubject to subject of msg
set theSender to extract name from sender of msg
set toText to "@mail @takeaction @" & theSender & "@" & theSubject
tell application "Terminal"
do script "/your/path/to/todo.sh  add \"" & toText & "\""
end tell
end repeat
end tell
end perform mail action with messages
end using terms from

If any one has any advise for improvement -- I'm welcome to it.
Dara




Thu Aug 3, 2006 6:40 am

dara_ayanna
Offline Offline
Send Email Send Email

Forward
Message #513 of 2423 |
Expand Messages Author Sort by Date

Ok, so I know that Gina is working on a email portion for todo.sh but here is something in the mean time for Mail.app users. It's a first stab and very rough,...
Dara Pressley
dara_ayanna
Offline Send Email
Aug 3, 2006
5:19 am

While I'm in the apple scripting mood. I wrote this little piece to get my aimbot started. You have to set up your todobot alias first. I call mine todoaim. ...
Dara Pressley
dara_ayanna
Offline Send Email
Aug 3, 2006
6:10 am

Ok, I made a second version of this. The original I'm using to key messages from other people. This one is for messages just from me. I created a rule that...
Dara Pressley
dara_ayanna
Offline Send Email
Aug 3, 2006
6:40 am

Nice, Dara. I'm not really working on a todo to email script, so far I've got a one-liner (that may vary depending on your platform): grep @phone todo.txt |...
Gina Trapani
gina.trapani
Offline Send Email
Aug 4, 2006
12:23 am
Advanced

Copyright İ 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help