Tinderbox v10 Icon

Attribute values

Attribute values

Set the value of an attribute, here $Width:

set value of attribute "Width" of myNote to 5 

Note the AppleScript limitation of the (implicit use of the) named operator and its case-insensitivity matching names.

For setting a note's $Name, see here.

To get the value of a designated attribute:

get value of attribute "Width" of myNote 

Or, for an offset address:

get value of attribute "Width" of (lastChild of MyNote) 

Attributes with local values can be reported:

get the localattributes of MyNote 

… returns a list of attributes for a note where (both):

To remove any local value assigned to the designated attribute, restoring the inherited or default value:

delete value of attribute "Width" of myNote 

This is akin to the action $Width=;.

The default value of an attribute can be read or set from the note [sic] context:

get defaultValue of attribute "Width" of myNote 

set defaultValue of attribute "Width" of myNote) to "5" 

Don't forget to refresh the UI, to ensure the Tinderbox window reflects the changes made via scripting.


See also—notes linking to here: