if(winform.radiobutton.checked){
status=0;
}
if(winform.radiobutton2.checked){
status=1;
}
if(winform.radiobutton3.checked){
status=2;
}
if(winform.radiobutton4.checked){
status=3;
}
if(winform.radiobutton5.checked){
status=4;
}
简化如下
方法一
for(i=1;5;1){
if(mainForm['radiobutton'+i].checked){
win.msgbox(tostring(i) )
}
}
方法二
winform.button.oncommand=function(id,event){
for(name,ctrl in winform.eachControl("radiobutton")){
if(ctrl.checked){
status=string.match(name,"\d");
console.Log(status)
}
}
}