2012-10-30 186 views
1

我有一個應用程序,它將圖像作爲輸出,並且這些輸出將在郵件客戶端的新消息[作爲附件]中打開。如何在Mac OS X上查找默認郵件客戶端?

在Mac OS X上,Apple郵件是默認郵件客戶端。所以我所做的是編寫了一個自動工作流程,並使用「Open Finder Items」操作在Mail.app中打開輸出。

這裏是我的問題:

如果用戶已經配置了「Microsoft Entourage中」或「雷鳥」或任何其他郵件客戶端作爲其默認郵件客戶端,然後在其配置的郵件應用我的Automator動作無法打開輸出。

我有一些想法在這個鏈接中找到並啓動默認郵件應用程序。

How do I get the default mail client using applescript?

誰能幫我,我怎麼可以將我的圖像輸出到啓動的郵件客戶端的新郵件?

+0

對不起人們,這是一個關於我的問題: http://stackoverflow.com/questions/3986512/how-to-i-get-the-default-mail-client-using-applescript –

回答

1

根據記錄,在linked question接受的答案是這樣的:

tell application "System Events" 
    try 
     value of property list item "LSHandlerRoleAll" of (property list item 1 of property list item "LSHandlers" of property list file (path to preferences as text) & "com.apple.LaunchServices.plist" where value of property list items contains "mailto") 
    on error 
     "com.apple.mail" 
    end try 
end tell 

您還可以使用MMac::InternetConfig

VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "mailto")[1]'

DefaultApplication

$ ~/bin/DefaultApplication -url mailto: 
/Applications/Mail.app 
+0

我沒有得到如何附加圖像默認郵件客戶端的新消息..你能幫我嗎? –

相關問題