1

OS X の Mail.app から生のメッセージ コンテンツを取得して、次のアクションに渡す必要があります。

残念ながら-これをテストしました-動作しません::(

a

メッセージの「コンテンツ」を選択したくありませんが、rawコンテンツ (base64 でエンコードされたもの) を次のアクションに渡したいです。

そのため、おそらくaction「選択したメール メッセージを取得」と「新しいドキュメント」の間にいくつかの AppleScript が必要になるでしょう。

これを行う方法がわかりません...

「New TextEdit doc」はテスト専用です。実際のアクションはperlスクリプトでありraw message contentstdin.

4

2 に答える 2

3

試す:

on run {input, parameters}
    set theSource to {}
    tell application "Mail"
        repeat with aMessage in input
            set end of theSource to aMessage's source & return
        end repeat
    end tell

    return theSource as text
end run
于 2013-07-31T13:49:28.803 に答える
2

「選択したメール メッセージを取得」アクションの後に実行する AppleScript アクションのコードを次に示します。アクション内に配置する必要があります:「AppleScript を実行」

-- This script accepts an input which is a list of message objects from Mail and returns their properties.
-- The properties returned are in the form of an AppleScript properties record.
on run {input, parameters}
    tell application "Mail"
        set output to {}
        repeat with thisMessage in input
            set output to output & (properties of thisMessage)
        end repeat
    end tell
    return output
end run

このスクリプトは進行中だと思いますが、そのアクションは AppleScript レコードのリストを返します。AppleScript で必要なフィールドを選択して選択し、すべてのメール メッセージを次のアクションのテキストとして返します。Perl スクリプトはプレーン テキストを解析でき、AppleScript レコードを処理する必要はありません。

上記の AppleScript を使用してレコードのキーと値を調べてから、完成したワークフローで実際に使用する AppleScript を記述して、必要なフィールドだけを選択することができます。

-- ケイデル
kaydell@yahoo.com
http://learnbymac.com

于 2013-07-31T13:19:56.123 に答える