Syntax is in Scripting Index and you can use Run Script

but you do have some mistakes in your script (you should use das instead of r1 in comparison)
Names Default To Here(1);
New Window("Example",
r1 = Radio Box({"Red", "Green", "Blue"},
das = r1 << get selected;
If(das == "Green",
Caption("Green")
);
)
);
r1 << set(2, runscript(1));
-Jarmo