AI-ExpertSystem-Simple
view release on metacpan or search on metacpan
bin/consult view on Meta::CPAN
status "No file was selected"
}
}
proc load_a_file {filename} {
if {[file isfile $filename] == 0} {
status "The file you selected is not really a file"
} elseif {[file readable $filename] == 0} {
status "The file you selected in not readable"
} else {
.run configure -state normal
status "Loading file $filename"
status "The next step is to Run it..."
wm title . [append newtitle "Simple Inference Engine: " [file tail $filename]]
}
}
proc do_run {} {
status "Run the file..."
status "This may take a few moments to get started..."
.save configure -state normal
.run configure -state disabled
global filename
global program
set filehandle [open "|$program -t $filename" "r+"]
set question ''
set responses [list]
.text delete 0.1 end
bin/consult view on Meta::CPAN
}
} elseif {[regexp {^information:(.*)} $text match newtext]} {
information $newtext
} elseif {[regexp {^explaination:(.*)} $text match newtext]} {
status $newtext
} else {
status $text
}
}
.run configure -state normal
}
proc do_save {} {
status "Save the output..."
set types { {{Text Files} {.txt} } {{All Files} * } }
set filename [tk_getSaveFile -filetypes $types -title "Save the results of a run" -initialfile "Results.txt"]
if {$filename != ""} {
( run in 1.001 second using v1.01-cache-2.11-cpan-283623ac599 )