Syntax

[the] name of <object>
[the] short name of <object>
[the] long name of <object>

if the short name of the target is "OK" then ...
set the name of button "Quit" to "Quit in " && timeLeft && "seconds"

Explanation

The name property is used to give an object a name that you can refer to it by. On some objects, like buttons or stacks, the name is also shown on them to the user when the title property is empty, as the button’s or the window’s title.

short name

The name of the object alone, like "OK" or "Cancel" or "Untitled Document". You can change this property.

name

The name of the object as a short, simple object descriptor, including its type, like button "OK" or field "First Name" or stack "Layer Effects".

You can also change this property, but it serves as a shorthand for the short name, so you set it to just the part that would be in the quotes. You can not use this to change an object’s type.

long name

The name of the object as an object descriptor. This currently is identical to the name property’s output, but will in the future include containing objects.

You can not change this property.

See Also