任何人都可以請告訴我,我如何獲得使用蘋果腳本的默認郵件客戶端?如何獲得使用applescript的默認郵件客戶端?
4
A
回答
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
-1
一直存在於這個toppic的討論在macscripter-forum 那裏,你還找了用於測試的默認郵件客戶端
0
另一種選擇:VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "mailto")[1]'
相關問題
- 1. 如何使用Powershell獲取默認郵件客戶端?
- 2. 使用AppleScript通過默認電子郵件客戶端發送郵件附件
- 3. Java:打開默認郵件客戶端
- 4. 如何打開默認的電子郵件客戶端附件
- 5. 使用默認電子郵件客戶端發送文檔
- 6. 使用C#代碼檢查默認郵件客戶端
- 7. 將附件添加到客戶端的默認電子郵件客戶端
- 8. 如何將Thunderbird設置爲默認郵件客戶端
- 9. 如何在Mac OS X上查找默認郵件客戶端?
- 10. 如何知道哪個是默認郵件客戶端?
- 11. 如何檢查前景是默認郵件客戶端
- 12. 如何獲得認證後的客戶端客戶ID爲adwords
- 13. 如何使用用戶的默認電子郵件客戶端彈出撰寫/創建郵件對話框?
- 14. PHP使用默認郵件客戶端打開新電子郵件
- 15. 如何在mac os x上獲取默認郵件客戶端版本?
- 16. 如何獲得jenkins的默認用戶
- 17. Javascript打開默認電子郵件客戶端不起作用
- 18. 用鏈接打開默認郵件客戶端
- 19. 如何使用vb.net中的默認電子郵件客戶端發送帶附件的電子郵件
- 20. 如何使用AppleScript在mail.app中設置默認發送電子郵件帳戶?
- 21. mailto沒有默認的電子郵件客戶端
- 22. Android默認電子郵件客戶端的html支持
- 23. 發送帶附件的電子郵件(默認郵件客戶端)
- 24. 如何連接到默認郵件客戶端併發送附件?
- 25. 無法打開默認郵件客戶端
- 26. Python:在系統上啓動默認郵件客戶端
- 27. 通過Javascript默認電子郵件客戶端檢測
- 28. 查找默認電子郵件客戶端
- 29. 無法打開默認郵件客戶端
- 30. 如何獲得默認開放yum客戶端的/etc/yum.repos.d配置
似乎並沒有對高塞拉利昂工作。因人而異。 – dashard 2018-03-09 12:59:02