AppleScript 读写plist文件

--构建完整路径

set filePath to ("" & (path to library folder from user domain) & "Preferences" & ":com.eusoft.eudic.plist")

--转为unix路径

set plistPath to POSIX path of filePath

tell application "System Events"

--方法一

(*

tell property list file plistPath

set value of property list item "MAIN_TimesLeft" to "820711"

end tell

*)

--方法二

set plist to property list file plistPath

set value of property list item "MAIN_TimesLeft"of plist to "820711"

end tell

上一篇:网络体系结构——ISO/OSI参考模型


下一篇:对LinqtoExcel的扩展 【数据有限性,逻辑有效性】