Sub onButtonClick
input = Controls.GetTextBoxText(mainTxtBox)
If (Controls.GetButtonCaption(Controls.LastClickedButton) = "Enter") Then
keyWordL = Text.GetLength(input)
For i = 1 To keyWordL
nums[i] = Text.GetSubText(input,i,1) 'breaks down input into seperate variables
For j = 0 To 9 'compare one char. w/ all digits ea. keyWordL loop
If (nums[i] <> digits[j]) Then
p = p + 1
EndIf
If (p >= 10) Then 'if true then values of nums doesn't match any digits & thus isn't a number
nums[i] = ""
space = 0
Else
space = 8
EndIf
EndFor
p = 0
GraphicsWindow.DrawText(bx,by-bh*2,nums[i])
bx = bx + space
EndFor
ElseIf (Controls.GetButtonCaption(Controls.LastClickedButton) = "Clear") Then
GraphicsWindow.Clear()
createGUI()
EndIf
EndSub