This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 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.