[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl as a Outlook Express Rule



At 18.36 +0200 2000.04.02, René Laterveer wrote:
>In Outlook Express you can set up a mail rule to run an applescript. has
>anyone used this to munch an incomming message with MacPerl?
>Does anybody have any examples?

I don't know how these AppleScripts work.  Do they get passed an event that
you have to set up a handler for, or is it the responsibility of the script
to get the text somehow, or ... ?

In any event, it is almost surely possible with MacPerl.  If it requires
Apple events, it may be difficult.  Or with Mac::Glue, it may be easy.  I
dunno how it works though, so I dunno.

One thing you might try is embedding MacPerl in an AppleScript.

tell application "MacPerl"
  set myNewText to do script [myScript, myText] mode batch
end tell

myText is the text you want to munch through.  myScript can be either text
of a script, or a path to a script on disk.  myText is passed in as
$ARGV[0] to the Perl script.  The MacPerl script should print the result to
STDOUT.

-- 
Chris Nandor       |     pudge@pobox.com      |     http://pudge.net/
Andover.Net        | chris.nandor@andover.net | http://slashcode.com/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org