applescript:更新属性?

applescript:更新属性?,applescript,Applescript,这可能是一个非常基本的问题 我总是看到 make new document with properties { x: "1", y: "2", z: 3" } 但是我以后如何更新这些属性呢 tell first document -- i am trying to set the volume name property set volume name of document to "BLA" -- also tried: set properties of first do

这可能是一个非常基本的问题

我总是看到

  make new document with properties { x: "1", y: "2", z: 3" }
但是我以后如何更新这些属性呢

 tell first document

 -- i am trying to set the volume name property 
 set volume name of document to "BLA"
 -- also tried:
 set properties of first document to {volume name:"BLA"}

 end tell

但这根本不起作用,官方语法是什么?无法联机找到它。

您需要以适当的文档(或任何具有该属性的文档)为目标,但这些属性的访问方式与任何其他属性相同,例如

tell application "whatever"
    set x of document 1 to "5" -- document 1 is usually the front document
    tell document 1 to set x to "5"
end tell
请注意,应用程序属性可能不可写-请检查其脚本字典