However, I can not run a single Tcl command like "wish puts {hello}"
which will not work. In order to run a single Tcl command, I need to
use "Open system command pipe.vi" but that seems to be a Mac and linux
version, no windows version available. so anyone have a suggestion on
how to solve this problem? Thank you,
Mike
You can use a small script that accepts commands as arguments and
executes them:
# do.tcl
eval $argv
Put that in a file called "do.tcl" and then exec it from labview like as
"tclsh do.tcl puts Hello".
-- Neil
do you have any idea on how to realize it in labview? thanks,
Mike
On Aug 2, 8:14 am, Neil Madden <n...@cs.nott.ac.uk> wrote:
Perhaps you could expand on that idea: create a file containing
the exact commands you want to run. instead of giving commands
as arguments to the single line tclsh, you give it the name of the file
containing your scripts.
tclsh do.tcl c:/process_me.tcl
# process_me.tcl
load myfile.dll
puts "xyz"
etc.
# do.tcl
# note: add some checks on the args
eval [read [open [lindex $argv 0]]]
>
> # do.tcl
> # note: add some checks on the args
> eval [read [open [lindex $argv 0]]]
Or just do tclsh c:/process_me.tcl ... (or use [source]).
-- Neil
Try doing a system exec call that issues a command like 'echo puts hello |
tclsh'. I do this sometimes when I just want to issue a single command to
tclsh. If you need to do more than one command you can use a semicolon to
separate your TCL commands e.g., 'echo "puts hello; puts world" | tclsh'
Dennis LaBelle
echo puts hello | tclsh
in sysmtem exce.VI, but it won't work, labview output "memory is full,
NI488 detect no listner." I tried it command prompt, it works well.
so do you think whether I can use this way to run the following
command,
tclsh load myfile.dll
%i2c_rd Ox23 3
where myfill.dll is a Dynamic link library, and i2c_rd is a command
created in myfile.dll.
Mike
> tclsh'.
On Aug 3, 4:03 am, Dennis LaBelle <label...@nycap.rr.com> wrote:
> Dennis LaBelle- Hide quoted text -
>
> - Show quoted text -