At the console-prompt you can type "Testfunc" and it's starts.
Would it be possible to add such or similar option to newlisp.
When we make then an application with a console window
a direct command-typing would be possible without paranthesis.
The command would then ask interactivly about input data.
After some thoughts about the problem, it should be possible just by modifying the TCL-code of the console. Just compare the input against a command-list and when the input-string is in the command-list, make a proper lisp-call out of it and send it to newlisp. So the define could stay as it is and we have only to set up the command-list.
The function to modify in newlisp-tk.tcl would be 'ProcessConsoleInput()' before the second to last line which says: 'puts $nlio $lastCommand' , you could check the contents of last command and than replace it with a newLISP command with parenthesis etc.:
----------------- before -------------------
update
puts $nlio $lastCommand
flush $nlio
----------------- after ---------------------
update
if { $lastCommand == "dir" } { set lastCommand "(directory)" }
if { $lastCommand == "syms" } { set lastCommand "(symbols)" }
if { [llength $Ide(DirectConsoleCmd)] > 0 } {
set cmdpos [lsearch -exact $Ide(DirectConsoleCmd) [string tolower $lastCommand]]
if { $cmdpos > -1 } {
set lastCommand "("
append lastCommand [lindex $Ide(DirectLispCmd) $cmdpos] ")"
}
}
Adding the '-exact' option will prevent to activate the first command through input of '*'. Or something like 'd*'. Only the exact command will trigger.