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:
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.
Before proceeding let's see the basics.