Get/Set text selected in a Mail.app message
Get/Set text selected in a Mail.app message
- Subject: Get/Set text selected in a Mail.app message
- From: " Emmanuel M. Décarie " <email@hidden>
- Date: Sat, 09 Dec 2006 12:00:05 -0500
Hello there,
I just switched from Mailsmith to Mail.app and I'm not very familiar
with the scripting dictionary. I want to do a very simple thing,
which is to be able to get/set a selected text in a message. I looked
around the net, and in the Mail scripts from Apple, but can't find a
way. Here's a script that I used to test this.
All commented lines are generating an error.
tell application "Mail"
set msg to selection
set msg to item 1 of msg
set c to content of msg
--set s to selected text of c
--set s to selected text of msg
--set s to selected text
end tell
Also, is it possible that a rule use the returned value of an
AppleScript to apply or not a rule? I'm asking this because I want to
be able to pass the content of a message to an AppleScript calling a
shell script that will grep with a regex the content of a message
and then, depending of the result, return true of false to a rule.
TIA
Cheers
-Emmanuel
--
Emmanuel Décarie / Programmation pour le Web - Programming for the Web
<http://scriptdigital.com/> - Blog: <http://lettre13.com> - AIM:
scriptdigital
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden