Scripting
- Some content was not yet translated. See the English original. Please edit the manual page if you have the rights for translation.
GeoGebra supporta due linguaggi di scripting: GGBScript e Javascript. Uno script è una sequenza di azioni che possono essere attivate da:
- un clic del mouse o l'aggiornamento di un determinato oggetto
- il caricamento di un file (in Javascript)
- i listener Javascript (vedere en:Reference:JavaScript)
Per definire gli script utilizzare la scheda Scripting della finestra di dialogo Proprietà.
GGBScript
È possibile creare degli script contenenti i comandi di GeoGebra.
- a è uno slider a valori interi
lista1={"rosso","verde","blu"}
- nella scheda All'aggiornamento digitare
ImpLegenda[a,Elemento[lista1,a]
- muovendo lo slider, questo cambierà colore
JavaScript
JavaScript is a programming language used by many Internet technologies. Unlike GeoGebra Script, in Javascript the commands don't have to be executed as a simple sequence, but a control flow (if
, while
, for
) can be used. For generic JavaScript you can find a nice tutorial on developer.mozilla.org. In GeoGebra, you can use special JavaScript commands which allow you to change the construction.
Description of command / feature needed. Please enter it instead of this template into Manuale:Scripting. so that it's included also to the public namespace. For more details see Project:HowTo |
Complete list of available commands can be found in Reference:JavaScript. GeoGebra contains its own JavaScript engine. When exported as Dynamic Worksheet one can choose whether to use this engine or the one contained in browser applets.