
我需要像這樣在 applescript 中運行 shell 腳本
set key_status to (do shell script "defaults read " & path_to_plist & " PlistKey")
但是unix給了一個錯誤,因為這個腳本似乎用逗號分隔path_to_plist和PlistKey,所以它嘗試運行這個
defaults read ~/Library/Preferences/plist_name, PlistKey
這給了這個錯誤
域/預設對不存在
有人知道該怎麼辦嗎?
答案1
你有沒有嘗試過
set key_status to (do shell script " defaults read & path_to_plist & \" PlistKey\" ")
?