Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting errors while executing with exec in tcl/tk

Status
Not open for further replies.

csreedhar

Programmer
Jul 31, 2003
8
IN
I am facing some problems in tcl/tk windows version I am using tcl/tk 8.4.4.0 version on win 98. When I am using "exec" then I am getting errors. example: set msg [exec c:\cssplit.exe]; where cssplit is "C" program and cssplit.exe executable file, when executing this, its giving error "child process exited abnormally while executing exec cssplit". when I am executing batch files then its givng couldn't execute test-spec.bat no such file or directory, but file is existing, not only this what ever I give with "exec" command all are getting errors. Could you please suggest me to execute this command.

And another question is related to "ctoken". ctoken in windows version tcl/tk not working why? Is there any another method replacing this in windows version tcl/tk?

Could you kindly suggest me.

 
For your first question about exec I can suggest you:
Code:
  catch {exec [file nativename c:/cssplit.exe]} msg
  puts "exec returned: \"$msg\""
Be careful with Windows pathes: the \ char is an escape char in Tcl. Use the file command to avoid pitfalls.

Some doc on the subject:
Some general information on Tcl:

A suggest for your second question: ask one question by post.

HTH

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top