You can use an Imput Box not only for giving the result of a calculation, but also for giving the coordinates of a point. In this case working with an inputbox for an empty text works fine. In this method the filled in coordinate is assigned to the object Ans. In next applet one has to give the coordinates of a point. See how it works and make it yourself following the construction steps. [br]So we get:[br][list][*]Ans = (pi, pi) to start with an answer that certainly doesn't equal the solution[br][/*][*]text1 = "" is an empty text[/*][*]Create an inputbox for the object [i]text1[/i] with a scripting command SetValue(Ans, %0) to assign the filled in coordinates to Ans.[/*][/list]
[table][tr][td]1[/td][td][/td][td]Type the command [b]a = RandomBetween[-5, 5][/b] to create a number a.[/td][/tr][tr][td]2[/td][td][/td][td]Type the command [b]b = RandomBetween[-4, 4][/b] to create a number b.[/td][/tr][tr][td]3[/td][td][/td][td]Type the command [b]Sol=(a, b)[/b] to create a point Sol. [br][u]Note 1[/u]: Be careful to use a capital. If you don't you will create a vector instead of a point.[br][u]Note 2[/u]: Rightclick on it to open the properties and define the title as[b] P[/b].[/td][/tr][tr][td]4[/td][td][/td][td]Type the command [b]Ans=(pi, pi)[/b] to create a point Ans.[/td][/tr][tr][td]5[/td][td][/td][td]Type the command [b]empty = ""[/b] to create an empty text.[/td][/tr][tr][td]6[/td][td][/td][td]Type the text [b]Give the coordinates of P[/b] in the Graphics.[/td][/tr][tr][td]7[/td][td][icon]/images/ggb/toolbar/mode_textfieldaction.png[/icon][/td][td]Select the Input Box Tool and create an Innput Box with label = , linked to the object [b]empty[/b].[br]Rightclick on it to open the properties of the Input Box:[br]- In the tab scripting type in On Click the command [b]SetValue[Ans, %0][/b].[br]- In the tab Advanced define the Dynamic Colors for feedback (see below).[/td][/tr][tr][td]8[/td][td][icon]/images/ggb/toolbar/mode_buttonaction.png[/icon][/td][td]Select the Button Tool to create a button with label new exercise and as commands[br]- [b]UpdateConstruction[][/b][br]- [b]SetValue[empty, ""][/b][br]- [b]Setvalue[Ans, (pi, pi)][/b][/td][/tr][/table]