The code used by LiveCode is simple but more verbose than other languages.

You can't write a program using just a script, you have to create an interface of at least one stack, then add code to it.

Every window is called a stack, the area inside the border of a window is called a card. You can totally change the appearance of a window creating a new card.

Every card can contain any number of objects: buttons, images, tables, and etc.

This image of the project browser shows LiveCode hierarchy:


Project browser

Code can be inserted inside handlers attached to a stack, a card or an object.

LiveCode is different from other languages, in that it is strongly user oriented, so code isn't executed from the top to the bottom of the script. On the contrary, code is usually inserted inside messages, if any action triggers the message, the code inside that message is activated.

For example if we want to create a button that shows a new window with "Hello world!". Well, just drag and drop a button in our stack, right click on it and select "edit script" (this will activate the code editor) and add the following code:

on mouseUp
  answer "Hello world!"
end mouseUp

mouseUp is the message sent at the end of a mouse button click.


Hello word example

Before proceeding let's see the basics.

Basic conceptsEdit

Advanced conceptsEdit

Programming structuresEdit

  • if
  • switch
  • repeat (while, until, for n times, for to step, for each, ...)

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.