How to run Tcl/Tk scripts with windows ? 
Author Message
 How to run Tcl/Tk scripts with windows ?

Quote:

>     Hi, I've been tinkering with Tcl/Tk under *N*X variants and want to be
> able to run them on MS-Windows.  I got the win41a2.exe and w32s125.exe and
> installed them.  How do I run a Tcl/Tk script ?  When I click on the wish
> icon, I get a console window, into which I can type commands, but I don't
> want to type in 100's of lines :-).  I tried giving it the name of a file
> containing the script, but it didn't like that.  From a MS-DOS window, I
> tried wish41.exe filename.tcl, but it said wish41 had to be run in win32.
> So, how do you run Tcl/Tk script files on Windows ?

>                   Thanks for any help,

>                                    Dirk


Hi Dirk,

try :
  % source my_script.tcl

where you script is in the 'my_script.tcl' file

Hope this helps,

-- Herve



Sat, 26 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?
    Hi, I've been tinkering with Tcl/Tk under *N*X variants and want to be
able to run them on MS-Windows.  I got the win41a2.exe and w32s125.exe and
installed them.  How do I run a Tcl/Tk script ?  When I click on the wish
icon, I get a console window, into which I can type commands, but I don't
want to type in 100's of lines :-).  I tried giving it the name of a file
containing the script, but it didn't like that.  From a MS-DOS window, I
tried wish41.exe filename.tcl, but it said wish41 had to be run in win32.
So, how do you run Tcl/Tk script files on Windows ?

                  Thanks for any help,

                                   Dirk



Sun, 27 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?

Quote:

>     Hi, I've been tinkering with Tcl/Tk under *N*X variants and want to be
> able to run them on MS-Windows.  I got the win41a2.exe and w32s125.exe and
> installed them.  How do I run a Tcl/Tk script ?  When I click on the wish
> icon, I get a console window, into which I can type commands, but I don't
> want to type in 100's of lines :-).  I tried giving it the name of a file
> containing the script, but it didn't like that.  From a MS-DOS window, I
> tried wish41.exe filename.tcl, but it said wish41 had to be run in win32.
> So, how do you run Tcl/Tk script files on Windows ?

>                   Thanks for any help,

>                                    Dirk


Try "source filename"


Sun, 27 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?

Quote:
> >     Hi, I've been tinkering with Tcl/Tk under *N*X variants and want to be
> > able to run them on MS-Windows.  I got the win41a2.exe and w32s125.exe and
> > installed them.  How do I run a Tcl/Tk script ?  When I click on the wish
> > icon, I get a console window, into which I can type commands, but I don't
> > want to type in 100's of lines :-).  I tried giving it the name of a file
> > containing the script, but it didn't like that.  From a MS-DOS window, I
> > tried wish41.exe filename.tcl, but it said wish41 had to be run in win32.
> > So, how do you run Tcl/Tk script files on Windows ?

> Try "source filename"

Also, use filemanager and double click on filename.tcl. You first need
to set up the "Association" for ".tcl" with wish41.exe.

Also, although I haven't tried it, you should be able to have an icon in
a program group and set the command line property to "wish41.exe filename.tcl"
(use the complete path of wish41). Try this by _copying_ the supplied
"wish" icon. Use File/Properties to change the icon name and command line.

--
...RickM...



Sun, 27 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?
Create an icon on the program manager.  Set its working directory to the
directory containing the tcl file.  Set its command line to (wish
path)\wish41.exe filename.  This works in 3.1 but in 95 the command line
for an icon does not want to take parameters.  I stumped on how to run a
script in 95.  Also when I run an app in 3.1 it opens a window and
displays the tk widgets but they don't work, are you having this problem
too?


Sun, 27 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?
Create an icon on the program manager.  Set its working directory to the
directory containing the tcl file.  Set its command line to (wish
path)\wish41.exe filename.  This works in 3.1 but in 95 the command line
for an icon does not want to take parameters.  I stumped on how to run a
script in 95.  Also when I run an app in 3.1 it opens a window and
displays the tk widgets but they don't work, are you having this problem
too?


Sun, 27 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?
to run a script XXXX.TCL try

  source xxxx.tcl

viel Spass

Goetz



Mon, 28 Sep 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?
Quote:


> >     Hi, I've been tinkering with Tcl/Tk under *N*X variants and want to be
> > able to run them on MS-Windows.  I got the win41a2.exe and w32s125.exe and
> > installed them.  How do I run a Tcl/Tk script ?  When I click on the wish
> > icon, I get a console window, into which I can type commands, but I don't
> > want to type in 100's of lines :-).  I tried giving it the name of a file
> > containing the script, but it didn't like that.  From a MS-DOS window, I
> > tried wish41.exe filename.tcl, but it said wish41 had to be run in win32.
> > So, how do you run Tcl/Tk script files on Windows ?

> >                   Thanks for any help,

> >                                    Dirk


I had the same problem.  I think its becase windows does not provide
the -f parameter that the wish executable requires in order to source
the script..  i.e. wish -f myscript.tcl from the command line will work
but if you double click on a tcl script that has been associated with
a wish then in effect windows is building the command line...
wish myscript.tcl.   To get around this (In windows 95) I keep a copy
of the wish executable on the desk top and drag and drop the tcl script on
to it.

Brian O'Brien.



Fri, 02 Oct 1998 03:00:00 GMT  
 How to run Tcl/Tk scripts with windows ?


Quote:
>Create an icon on the program manager.  Set its working directory to the
>directory containing the tcl file.  Set its command line to (wish
>path)\wish41.exe filename.  This works in 3.1 but in 95 the command line
>for an icon does not want to take parameters.  I stumped on how to run a
>script in 95.  Also when I run an app in 3.1 it opens a window and
>displays the tk widgets but they don't work, are you having this problem
>too?

Take a look at the "widget tour" shortcut that is created by the
binary release installer.  It runs wish with a script as an argument.
You should also be able to associate wish with .tcl files.

Watch out for files with spaces in the name.  You need to put quotes (")
around those names or wish will try to interpret them as multiple
arguments.

--Scott



Sat, 03 Oct 1998 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Running a TK script using wish80.exe within a tcl script

2. tcl/tk 8.0 problem with Windows app that calls tcl/tk script

3. problems running tk-script with tcl/tk 8.3.3

4. Run Tk scripts from Windows C++ program

5. run Tcl/TK script from within Vim?

6. Tcl/Tk scripts run inside C program

7. running tcl/tk script

8. Can _One_ Tcl/Tk script run _Two_ displays?

9. running tcl script on WINDOWS machine

10. Tcl CGI scripts fail to run on Windows 95

11. how do you run a script in windows 95 tcl

12. Running a Tcl/Tk applet within a Tcl/Tk program

 

 
Powered by phpBB® Forum Software