Posted to tcl by dgood` at Wed Aug 31 20:51:48 GMT 2011view raw
- if {$user_input eq ""} {
- set menu_level main
- } elseif {[scan $user_input {%s %s} cmd msg_id] != 2} {
- puts stdout "\nInvalid Input, try again.\n"
- } else {
- if {![string is wordchar -strict $cmd]} {
- puts stdout "\nInvalid Command_Name!\n"
- } elseif {![string is digit -strict $msg_id]} {
- puts stdout "\nInvalid Message_ID!\n"
- } else {
- simple_cmd $fh $msg_id $cmd
- }
- }