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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Tcl script in command prompt with Active Tcl and Win

Status
Not open for further replies.

Arepi

Technical User
Oct 23, 2008
17
0
0
HU
Hi,

I'm just getting started with Tcl. When i try to run my simple script in command prompt like this

C:\script.tcl

a window appears and there is no output in command prompt
When I try like this(as i know this is the right way for this)

c:\tclsh script.tcl

I get a message that system could not recognize "tclsh" as command or program or...

Has someone any idea to fix it?

Thanks

Arepi
 
Hi

Arepi said:
c:\tclsh script.tcl
Unless you installed Tcl in your c: drive's root directory, that path is wrong.

Hoping that the executable is already in the PATH, try [tt]tclsh script.tcl[/tt] .
Arepi said:
C:\script.tcl
Again, the drive and the absolute path looks bad there, but you can set up an association so Windows automatically pass files with .tcl extension to the Tcl interpreter.

Hoping that the association is already set, try [tt]script.tcl[/tt] .

Feherke.
 
Do you have TCL installed?

You can set the PATH in Windows to point to TCL intrepreter or explicitly type the path when running scripts, i.e,

\path\to\tclsh.exe \script\lives\here\tcl_script.tcl

You can also set file association in Windows so when a script name is entered Windows know to call on correct intrepreter. Usually, this is done by default when you install software.





 
Thanks for answers!
I typed "tclsh85" instead "tclsh" and it works now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top