--构建完整路径
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

本文介绍了一种使用AppleScript构建路径并修改属性列表文件的方法。通过两种不同的方式更改了属性列表文件中的特定值,包括直接使用tell命令以及先读取文件再进行修改。

被折叠的 条评论
为什么被折叠?



