Livecode Wiki

LiveCode script language

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

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

First of all you can't write your code directly on the script, you have to create an interface and add code to it.

Every window is called stack, every complete window inside a window is called 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 on a stack, a card or an object.

LiveCode is different from other languages, it is strongly user oriented, so code isn't executed from top to 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 we want to create a button that show 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 when the button is clicked.


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.