NatXotic
Jan. 6, 2004 20:33:04
Hiya,
i'm playing a bit with scripting and is going fine till a certain degree.
I wrote a small tcl/tk script file which loads nice in hscript via the
tk C

path_to_script/script.tk
command.
But as soon as i include an external *.exe file such as mcp.exe it gives me an error saying something like unknown command MZ.
How do i have todo something like that?
I played around and i also couldn't start any houdini .exe file from within houdini. Is there a way to make something like that possible?
Cheers
edward
Jan. 6, 2004 22:44:00
Try:
unix mcp …
where … are your command line arguments.
NatXotic
Jan. 8, 2004 14:42:55
Thanks for the reply edward, though short and not the solution.
proc start {} {
global config
set string “unix mcp -f $config(ff) $config(lf) $config(inf) -o -r $config(fr) $config(of)”
exec $string
}
it doesn't recognice the unix command from within the script
when i just use
unix mcp … in the houdini textport then it opens a commandline does something and closes it, but it didn't create a videofile, probably some more error messages, just goes to fast to see.
The above code would be the function i want to call when a button is pressed.
Cheers
edward
Jan. 8, 2004 23:18:53
There's no procedures in hscript as it's not really Tcl so your code won't work. As for scrolling too fast, try prototyping your script using hscript. Use “hscript <hipfile>” and then run your regular textport commands.
NatXotic
Jan. 9, 2004 09:06:30
in other words, that would mean that i have to use regular tcl to make a GUI for mcp?
thought i could use the houdini integrated one.
Well if that's the case, then all the hazzle isn't worth it. I thought to write a simple script for those who have trouble using the commandline of mcp. But if i have to include regular tcl/tk in it then the hazzle is too much for such a simple tool.
Cheers
edward
Jan. 9, 2004 23:47:44
Sorry, I read your original question waaay too fast. You're asking a Tcl/Tk question, not an hscript one.
The reference is for the exec command here:
http://www.tcl.tk/man/tcl8.0/TclCmd/exec.htm [tcl.tk]
So just try replacing the word “unix” in your code with “exec”.
NatXotic
Jan. 10, 2004 19:13:35
i originaly have used exec, because i know quiet a bit of tcl/tk.
but it just didn't work. It wasn't recognizing the mcp command.
“Unknown command …” was the message box that popped up.
I tried “mcp -f …”
aswell as “mcp.exe -f ……”
just not working.
btw, if you look in my code there it shows, how i used the exec command.
I first make string with the command and then execute it.
Thx, Cheers
EigenAlex
Jan. 10, 2004 20:04:54
Hi, just out of curiosity, are you able to run mcp on command shell?
NatXotic
Jan. 11, 2004 05:14:19

of course,
from the houdini command line tools, - yes