SuperStrict Local window:TGadget=CreateWindow("o_O",0,0,640,480) Local tf:TGadget=CreateTextField(32,32,64,20,window,2) Local a:String Local a2:String Local a3:String Local t:Int Repeat WaitEvent() If EventID()=EVENT_WINDOWCLOSE End If EventID()=EVENT_GADGETACTION If EventSource()=tf a=TextFieldText(tf) a2="" For t=0 Until Len(a) a3=Mid(a,t+1,1) If Instr("0123456789",a3) ' number found? a2:+a3 EndIf Next SetGadgetText tf,a2 EndIf EndIf Forever
I leave it up to you to make a decent function out of it. :P