Code:
sReturn = Input.GetText("Input1"); nReturn = sReturn:find('[%a]');[I][COLOR=#008000] -- Look for any letters in the return-string[/COLOR][/I] if nReturn then [I][COLOR=#008000] -- If letter found at any position in return-string, then advise ...[/COLOR][/I] Dialog.Message("Attention!", "You can't convert LETTERS, just Numbers", MB_OK, MB_ICONSTOP, MB_DEFBUTTON3); else if sReturn == "" then [I][COLOR=#008000]-- Check to ensure that Input Box has not been left empty[/COLOR][/I] Dialog.Message("Attention!", "Input can NOT be left blank."); else [I][COLOR=#008000]-- Otherwise permit the action[/COLOR][/I] sOutput = sReturn * 17.9063; Label.SetText("Label1", String.Mid(sOutput, 1, 5).. " EGP"); end end
Leave a comment: