2010-10-21 41 views

回答

3

我發現這個代碼here的一部分,怎麼跑這對雪豹一些代碼示例( 10.6.4),它對我有用。

on run 
    set mailClient to getDefaultMailClient() -- store application id 
    tell application id mailClient to activate -- tell mail client to do something 
end run 

-- Grab id of default mail client 
on getDefaultMailClient() 
    set prefPath to (path to preferences as text) & "com.apple.LaunchServices.plist" 
    tell application "System Events" 
     try 
      value of property list item "LSHandlerRoleAll" of ¬ 
       (first property list item of property list item "LSHandlers" of ¬ 
       property list file prefPath whose value of property list items ¬ 
       contains "mailto") 
      on error 
       "com.apple.mail" 
     end try 
    end tell 
end getDefaultMailClient 
+0

似乎並沒有對高塞拉利昂工作。因人而異。 – dashard 2018-03-09 12:59:02

-1

一直存在於這個toppic的討論在macscripter-forum 那裏,你還找了用於測試的默認郵件客戶端

0

另一種選擇:VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "mailto")[1]'

相關問題