Re: How can I open attachment in Mail ?
Re: How can I open attachment in Mail ?
- Subject: Re: How can I open attachment in Mail ?
- From: has <email@hidden>
- Date: Thu, 26 Oct 2006 22:45:13 +0100
On 26 Oct 2006, at 15:51, Philip Aker wrote:
The fairest test would surely be that which most closely simulates
the conditions under which the script will ultimately be run. If
the intention is to eventually use it in terminal, via whatever,
then testing in that environment would make sense. However, since
the original script was explicitly intended to be invoked from a
Mail "Run AppleScript" rule, the comparison that I used seems (to
me, at any rate) fair enough.
"Run Applescript" is a bit of a misnomer. Although I had not
realized it was possible until now, Mail will run any OSA compliant
script in this situation. This means that for the OSA languages I
support, it will be possible to pass the input arguments to scripts
in LuaOSA, PerlOSA, PHPOSA, PythonOSA, RubyOSA, ShOSA, and TclOSA.
ISTR Mail rules send 'perform mail action with messages' events with
a list of message references as payload, so you'll need an OSA
component that supports sending and receiving Apple events.
As to whether or not the individual language can handle them,
that's another story. I'm reasonably certain Hamish Sanderson's
appscript for Ruby or Python could make a go of it though.
Appscript is easy enough to integrate into an OSA component that
provides the relevant hooks - its internal structure is very modular.
The only implementation bit I've not entirely figured out is sending
events to the host application, as the OSA API provides a couple of
callbacks for doing that (SendProc and ResumeDispatchProc) and the
Apple documentation is just a touch vague on how and when to use
them. But once I've finished doing the planned appscript ports I'll
maybe see about getting back onto some OSA component work.
has
--
http://freespace.virgin.net/hamish.sanderson/
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
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