{"identifier":10005,"topic":"","name":"Writing message handlers 2","text":"Of course, HyperCard doesn\u2019t know about the<code> doubleBeep <\/code>command, so it will never be sent automatically in response to an event. But you can send<code> doubleBeep <\/code>from the Message box or use it as a statement in other handlers. <br><br>\n\n For example, the script of a card button might contain the following handler for the system message<code> mouseUp<\/code>: <br><br>\n\n <code><pre>on mouseUp\n  doubleBeep\nend mouseUp<\/pre><\/code> <br>\n<br>\nIf the script also contains the <code>doubleBeep <\/code>handler (or if the script of any object later in the message-passing path contains it), the<code> mouseUp <\/code>message will send the<code> doubleBeep <\/code>message, and<code> doubleBeep <\/code>will send two<code> beep <\/code>commands. Because<code> beep <\/code>is a built-in command, HyperCard beeps twice. <br><br>\n\n If HyperCard can\u2019t find the<code> doubleBeep <\/code>message, it will complain (with a dialog box) that it \u201ccan\u2019t understand\u201d the message. <br>\n","related":{"20813":null,"6658":"Handling messages","26982":"on","8578":"The message-passing order","10721":"Using parameter variables","5306":"What are messages?"},"examples":"","demo":"<br><br>\n\n ","debug":{"9":["Of course, HyperCard"],"10":["If the script also c"]}}