{"identifier":65969,"topic":"Functions","name":"target","text":"<code>the <\/code>[<i><code>adjective<\/i><\/code> ]<code> target <\/code> Value returned: a text string that identifies the object that originally receives a message sent by HyperCard or by the<code> send <\/code>keyword. If an object does not have a name,<code> the target <\/code>returns its ID.  <br><br>\n\n The adjectives<code> abbreviated<\/code>,<code> long<\/code>, and<code> short <\/code>return various forms of an object\u2019s name as with the property<code> the name. <\/code>(Click Related Topics for more information about<code> name<\/code>.) <br>\n<br>\nNote:<code> the abbreviated target <\/code>is the same as<code> the target<\/code>. <br><br>\n\n HyperTalk distinguishes between<code> the target <\/code>and<code> target<\/code>:<code> the target <\/code>always returns a string that identifies an object, but the single word<code> target <\/code>is a container. <br><br>\n\n  If<code> the target <\/code>is a button or field,<code> target <\/code>refers to the contents of that button or field.  If not, <code>target <\/code>returns an error. <br>\n","related":{"77648":"name","27256":"pass","29297":"send"},"examples":"the short target\nthe long target\nthe abbreviated target\nthe abbrev target\nthe abbr target\n\nput word 2 of the clickLine into N\nselect line N of the target -- a field\n\nif the target contains \"button\" then ...\nelse if the target contains \"field\" then ...","demo":"on whoIsTheTarget\n   -- Since the Run the Script button sends a message to the demo script\n   -- field, the target is set to it while this handler runs.\n   answer \"The target is:\" && <b>the target<\/b>\n   answer \"target (a container) is:\" & return & return & \u00ac\n   char 1 to 200 of <b>target <\/b>-- string must be < 255 chars\n end whoIsTheTarget\n <br><br>\n\n <br><br>\n\n ","debug":{"9":["the [adjective ] tar"],"10":["Note: the abbreviate"]}}