{"identifier":25485,"topic":"Keywords","name":"do","text":"<code>do <i>expression<\/i> [as <i>scriptLanguage<\/i>]<\/code> <br><br>\n\n The<code> do <\/code>keyword forces HyperCard to evaluate<code> <i>expression<\/i> <\/code>and to send the result as a message to the current card.   <br><br>\n\n The value of<code> <i>expression<\/i> <\/code> can contain more than one line. For example, if you have a series of statements in a card field called Example, HyperCard will apply<code> do <\/code>to each line: <br><br>\n\n <code>do card field \"Example\"<\/code> <br>\n<br>\nWhen you use the <code>as <i>scriptLanguage <\/i><\/code>form, HyperCard executes the script in<code> <i>expression<\/i> <\/code>using the OSA-compliant scripting component named in <i><code>scriptLanguage<\/i>:<i> <br><br>\n\n <\/i>do field 1 as AppleScript do theScript as UserTalk<\/code> <br><br>\n\n You can also send<code> do <\/code>from the Message box. <br>\n","related":{"67163":"value"},"examples":"","demo":"on doLast3Lines\n   put the number of lines of bkgnd field \"Demo Script\" into N\n   <b>do<\/b> line (N - 2) to N of bkgnd field \"Demo Script\"\n end doLast3Lines\n <br><br>\n\n put sqrt(2)\n beep\n flash\n ","debug":{"9":["do expression [as sc"],"10":["When you use the as "]}}