Preserve Scripting Commands on Output Objects When creating new tool?
Question: In task https://www.geogebra.org/m/SmVRbqqb,
You can plot a point on the y-axis and a point anywhere else. If you click the custom tool "DisplayEquation", select the two points. The slope, line, and equation will appear.
However, I tried using GeoGebra script on the slope (the green "m") BEFORE CREATING CUSTOM TOOL. I put:
If[m>=0, SetColor[m, "Dark Green"], SetColor[m, "Crimson"]]
(Don't worry-- I used the greater than or equal to sign--didn't type it in this way).
In essence, I want positive slopes (that will appear as output objects after student uses custom tool) to appear green and negative slopes to appear red. I had this script command applied to the m (slope) object BEFORE CREATING THE CUSTOM TOOL.
Is there a way GeoGebra scripting commands (for any output object) can be preserved (i.e. "remembered") when creating a new tool?