What are Scripts?
Scripts are a sequence of commands, that are executed one after each other. GeoGebra supports two scripting languages - GeoGebraScript (GGBScript) and JavaScript. The execution can be triggered by:
- JavaScript listeners (see Reference: JavaScript)
- clicking a particular object
- updating a particular object (when value or properties of the object are changed)
- loading the file (in case of JavaScript)
Note
Scripting is a topic intended for experienced users of GeoGebra, I recommend you to take a look at the other tutorials before you dive into this topic if you're not that familiar with GeoGebra at the moment. The basics about how scripting works and how you can add scripts to your constructions are explained here of course.
How do GGBScripts work?
GGBScripts are a sequence of GeoGebra commands executed in the following two situations:
- Click: A script is executed after the user clicked on the object.
- Update: A script is executed when the value or properties of the object changed. This may happen if the user moves elements of the construction around, changes sliders, etc.
More information
If you don't know anything about Scripting in GeoGebra I recommend you to check the following tutorials:
A complete list of the GeoGebra commands can be consulted here.