---
title: Handling messages
card_id: 6658
---

# Handling messages

As a scripter, you write message handlers to respond to messages. When an object receives a message, HyperCard searches the object’s script for a handler with the same name (a handler starts with the word `on` followed by the name of a message). If HyperCard finds a match, it runs any HyperTalk statements in the handler until it hits an `end` statement.

For example, if you want a button to respond to a `mouseUp` message, you would add a `mouseUp` message handler to its script.

Click Related Topics for more information about opening a script window.

## Related Topics

* [Open a script window](/HyperTalkReference/editingscripts/Open-a-script-window)
