 |
THE HYPERCARD CENTER |
|
|
Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
namethe [adjective] name of object the [long] name of HyperCard set [the] name of object to text set [the] name of [menuItem of] menu to text get [the] [English] name of [menuItem of] menu
The name property returns or sets the name of an object, menu item, or menu. If the element doesn't have a name, the name returns the ID of the object instead. the long name of HyperCard returns the full path to HyperCard:
myDisk:Desktop Folder:HyperCard Folder:HyperCard
You can use the adjective English to determine the names of menus and menu items if you're using a localized version of HyperCard: if the English name of menuItem 5 ¬ of menu "Edit" is "Paste"...
The adjectives abbreviated , long , and short return various forms of an object’s name (click Demo Script to see examples). Note: the abbreviated name is the same as the name . Examplesthe short name of button 1 the abbreviated name of bkgnd button 4 the abbrev name of bkgnd button 4 the abbr name of bkgnd button 4 the name of card field 1 of last card the long name of me the name of menuItem 1 of menu 2 the name of first menuItem of menu "File" set the name of button 1 to "Hide field" set the name of this card to line 1 of field "Title" set the name of menuItem 1 of menu "File" to "Trouble" if the English name of menuItem 5 of menu "Edit" is not "Paste"...
Demo Scripton nameDemo answer "The short name of card id 86868 is:" & return & ¬ (the short name of card id 86868) & return & return &¬ "The abbreviated name is:" & return &¬ (the abbr name of card id 86868) & return & return &¬ "The name is:" & return &¬ (the name of card id 86868) & return & return &¬ "The long name is:" & return &¬ (the long name of card id 86868) end nameDemo
Related Topics Placeholders
adjectiveOne of the following: abbr abbrev abbreviated long short
See also: formatName objectHyperTalk Definition The object HyperCard , or any expression that identifies an object by name, number, or id. For example: HyperCard me [the] target button 1 background part 6 card field id 3894 this card next background stack "My Stack"
AppleScript Definition An identifiable part of an application, or a thing within an application that can respond to commands. textAn expression that evaluates to a text string. A text expression can be a literal string surrounded by quotation marks or the value of a container. For example: "Hello" "The sum is:" && 3 card field 1 line 1 of bg fld "Address" the Message box the selection myVar -- a variable
See also: background, bkgnd, button, card, field, menu, menuItem, and stack menuItemAn expression that evaluates to one of the following: menuItem text menuItem posInteger ordinal menuItem
For example: menuItem "New" menuItem 2 second menuItem
menuAn expression that evaluates to one of the following: menu text menu posInteger ordinal menu
For example: menu "File" menu 2 second menu
HyperTalk Reference
|