Hi Vidor,
by switching the TOOL in the "tools" palette, see screenshot, you can easily switch between RUNTIME and EDIT "mode".
Using the left tool (the runtime tool) you can test your stack like an enduser of your (later) app will experience it.
With the right tool (the EDIT tool), the arrow with the little cross, you can add new controls (buttons, fields etc.) and also write scripts
for all of your objects on the card:

- Bildschirmfoto 2025-05-27 um 11.10.35.png (7.99 KiB) Viewed 2912 times
Do this:
Click the EDIT tool in the palette, then RIGHT-CLICK on your button and select "Edit script" in the popup-menu:

- Bildschirmfoto 2025-05-27 um 11.11.14.png (17.55 KiB) Viewed 2912 times
Then the SCRIPT WINDOW will appear and you can write your script.
See a list of available hanlder for this object in the list on the left.
Click on "mouseup" and the so far empty handler will appear on the right side in the window.
Now add this:
Code: Select all
on mouseup pMouseButton
## This marks a comment, so you can add comments to your script
## to know later what you have been doing here :-)
## The following line is the actual script that will open a dialog window with your string and an OK button
answer "Hello Vidor!"
end mouseup
This will open a new window, a modal dialog, where you need to click on "OK" to make it diappear again.
Congrats you wrote your first working script.
Here you can find more infos and tutorials:
https://lessons.livecode.com
Best from germany
Klaus