command enableButtons v switch case v <= 0 put 0 into fld "Field1" set the enabled of btn "Button1" to true set the enabled of btn "Button2" to false break case v >= 10 put 10 into fld "Field1" set the enabled of btn "Button1" to false set the enabled of btn "Button2" to true break default set the enabled of btn "Button1" to true set the enabled of btn "Button2" to true put v into fld "Field1" end switch end enableButtons