Livecode Wiki


2,133pages on
this wiki
Add New Page
Comments0 Share

Messages are the bones of the Livecode programming language. First of all let's see the path of the events:

Media 1317826757485 display

Message path

A message is a function that reacts on a event with its name. When an event like "MuoseUp" passes through a button with that message, it activates that message. The event can stop there or be passed to the next object. To pass to the next object in hierarchy use pass keyword:

pass MouseUp

A message it's like function of other programming languages. A message starts with "on MessageName" and ends with "end MessageName", like this:

on MyMessage
 answer "Hello world"
end MyMessage

Messages can have optional values (parameters), look the following example:

on MyMessage myoption1, myoption2
 answer "Hello world" & myoption1 & myoption2
end MyMessage

you can call it with all the following methods:

MyMessage 34
MyMessage 34,"hi"

Parameters not used are automatically set to empty.

You can't nest messages inside messages.

You can activate the message of another object in two ways: sending or calling it.


Sending a message, send the specified message to that object, and momentary that object reacts as it is the current active object:

send MouseUp to button MySpecialButton


Call put the message in the current object, so it's behaviour may change:

call "MyMessage 34,hi" of button "myButton"

notice the use of double quote to insert parameters

All type of messagesEdit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.