• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I open attachment in Mail ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >How can I open attachment in Mail ? (From: Victor Frenklakh <email@hidden>)
 >Re: How can I open attachment in Mail ? (From: kai <email@hidden>)
 >Re: How can I open attachment in Mail ? (From: Philip Aker <email@hidden>)
 >Re: How can I open attachment in Mail ? (From: kai <email@hidden>)
 >Re: How can I open attachment in Mail ? (From: Philip Aker <email@hidden>)
 >Re: How can I open attachment in Mail ? (From: kai <email@hidden>)
 >Re: How can I open attachment in Mail ? (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: looking for great example scripts
  • Next by Date: Re: Need Filemaker 6 help - next value on serial number (auto enter)
  • Previous by thread: Re: How can I open attachment in Mail ?
  • Next by thread: Re: How can I open attachment in Mail ?
  • Index(es):
    • Date
    • Thread