Hello again,
I have an HScript script that takes in arguments, then is supposed to pass them into a TCL script. This doesn't work. Theonly way my TCL script takes args is if I open a TK window in Houdini then type “tclsh fileName.tcl args”.
The problem with this is that the lines of code that say “hscript ….” no longer work. So is there a way for me to pass my args that I type in textport throught to the .cmd file then the .tcl file?
Thank you
HScript <-> TCL
4187 7 0- idojomo
- Member
- 12 posts
- Joined: 7月 2005
- Offline
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
- idojomo
- Member
- 12 posts
- Joined: 7月 2005
- Offline
Oh, sorry about that.
If in the textport I do
>> source myfile.cmd $arg1 $arg2 $arg
and within myfile.cmd there is a line saying
>>tcl myfile.tcl $arg1 $arg2 $arg3
The arguments do not go through to the tcl. I get an error saying the syntax should be tcl myfile.tcl.
Now if I do
>>tclsh myfile.tcl $arg1 $arg2 $arg3.
The arguments go through BUT because in my tcl file, there are lines saying “hscript opadd …” or something, then I get a different error saying there is no such thing as hscript. This is because I'm now in TCL shell.
Thanks
If in the textport I do
>> source myfile.cmd $arg1 $arg2 $arg
and within myfile.cmd there is a line saying
>>tcl myfile.tcl $arg1 $arg2 $arg3
The arguments do not go through to the tcl. I get an error saying the syntax should be tcl myfile.tcl.
Now if I do
>>tclsh myfile.tcl $arg1 $arg2 $arg3.
The arguments go through BUT because in my tcl file, there are lines saying “hscript opadd …” or something, then I get a different error saying there is no such thing as hscript. This is because I'm now in TCL shell.
Thanks
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
- idojomo
- Member
- 12 posts
- Joined: 7月 2005
- Offline
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
- idojomo
- Member
- 12 posts
- Joined: 7月 2005
- Offline
source is a valid comman but it takes no arguments.
http://www.tcl.tk/man/tcl8.0/TclCmd/source.htm [tcl.tk]
In the Tk console, if i type in:
myfile.tcl $arg1 $arg2 $arg3, I still get the error.
but if go into tclsh and type the above it works, as long as I'm not calling hscript or outside programs.
At least I'm getting parameters passed on through hscript so that works for me.
Thanks
http://www.tcl.tk/man/tcl8.0/TclCmd/source.htm [tcl.tk]
In the Tk console, if i type in:
myfile.tcl $arg1 $arg2 $arg3, I still get the error.
but if go into tclsh and type the above it works, as long as I'm not calling hscript or outside programs.
At least I'm getting parameters passed on through hscript so that works for me.
Thanks
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
-
- Quick Links