Scripting Question

   7320   8   1
User Avatar
Member
40 posts
Joined: 7月 2005
オフライン
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 Cpath_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
User Avatar
Member
8161 posts
Joined: 7月 2005
オフライン
Try:
unix mcp …
where … are your command line arguments.
User Avatar
Member
40 posts
Joined: 7月 2005
オフライン
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
User Avatar
Member
8161 posts
Joined: 7月 2005
オフライン
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.
User Avatar
Member
40 posts
Joined: 7月 2005
オフライン
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
User Avatar
Member
8161 posts
Joined: 7月 2005
オフライン
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”.
User Avatar
Member
40 posts
Joined: 7月 2005
オフライン
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
User Avatar
Member
639 posts
Joined: 7月 2005
オフライン
Hi, just out of curiosity, are you able to run mcp on command shell?
User Avatar
Member
40 posts
Joined: 7月 2005
オフライン

of course,
from the houdini command line tools, - yes
  • Quick Links