How to pass the argv variables from batch file to .tcl file 
Author Message
 How to pass the argv variables from batch file to .tcl file

Hi,

       Earlier I used to create stand alone executable for TCL files. Now
that I find that invoking those executables take longer time, I decided to
use batch file in which I calling the wish83.exe with the tcl script file.

In the TCL script, I use argv vasriable to open up files. Now I invoke batch
file, the argument variable goes with batch file.
How to I redirect this argument variable to the tcl script. It looks more
like Windows problem than TCL problem.

I hope somebody would have had this problem and solved it.

Thanks & Regards
Kantha.



Sun, 09 Jan 2005 01:05:52 GMT  
 How to pass the argv variables from batch file to .tcl file

Quote:
> Hi,

>        Earlier I used to create stand alone executable for TCL files. Now
> that I find that invoking those executables take longer time, I decided to
> use batch file in which I calling the wish83.exe with the tcl script file.

> In the TCL script, I use argv vasriable to open up files. Now I invoke
batch
> file, the argument variable goes with batch file.
> How to I redirect this argument variable to the tcl script. It looks more
> like Windows problem than TCL problem.

> I hope somebody would have had this problem and solved it.

> Thanks & Regards
> Kantha.

If the list of arguments is not too long, you might get away with something
like:

script.tcl %1 %2 %3 %4 %5 %6 %7 %8 %9

Depending on the version of windows, there may be other options available,
too, but this is the simplest way I've seen. %1-9 refer to the first through
ninth arguments passed to the script.

--

When we attempt the impossible, we can experience true growth.



Sun, 09 Jan 2005 01:11:47 GMT  
 How to pass the argv variables from batch file to .tcl file
Hi Daniel,
                   Thanks for the reply.
                    The list of arguments is not long.

My batch file abc.bat contains

c:\tclnew\wish83.exe c:\tclnew\editor.tcl

When I have a shortcut in the windows pointing to this one line file
abc.bat, abc.bat gets the argument.
Inside the batch file the command is whish83.exe and second argument is the
tclscript. How do I use the %1 here????

If I change my batch file to
c:\tclnewwish83.exe c:\tclnew\editor.tcl %1

The %1 goes to the wish83.exe and not to tcl script.

How do I solve this.

Thanks in advance
Kantha.


Quote:


> > Hi,

> >        Earlier I used to create stand alone executable for TCL files.
Now
> > that I find that invoking those executables take longer time, I decided
to
> > use batch file in which I calling the wish83.exe with the tcl script
file.

> > In the TCL script, I use argv vasriable to open up files. Now I invoke
> batch
> > file, the argument variable goes with batch file.
> > How to I redirect this argument variable to the tcl script. It looks
more
> > like Windows problem than TCL problem.

> > I hope somebody would have had this problem and solved it.

> > Thanks & Regards
> > Kantha.

> If the list of arguments is not too long, you might get away with
something
> like:

> script.tcl %1 %2 %3 %4 %5 %6 %7 %8 %9

> Depending on the version of windows, there may be other options available,
> too, but this is the simplest way I've seen. %1-9 refer to the first
through
> ninth arguments passed to the script.

> --

> When we attempt the impossible, we can experience true growth.



Sun, 09 Jan 2005 01:42:21 GMT  
 How to pass the argv variables from batch file to .tcl file
Hi Daniel,
                  It works as you said.  Thank you very much.

Regards
Kantha.


Quote:
> Hi Daniel,
>                    Thanks for the reply.
>                     The list of arguments is not long.

> My batch file abc.bat contains

> c:\tclnew\wish83.exe c:\tclnew\editor.tcl

> When I have a shortcut in the windows pointing to this one line file
> abc.bat, abc.bat gets the argument.
> Inside the batch file the command is whish83.exe and second argument is
the
> tclscript. How do I use the %1 here????

> If I change my batch file to
> c:\tclnewwish83.exe c:\tclnew\editor.tcl %1

> The %1 goes to the wish83.exe and not to tcl script.

> How do I solve this.

> Thanks in advance
> Kantha.





> > > Hi,

> > >        Earlier I used to create stand alone executable for TCL files.
> Now
> > > that I find that invoking those executables take longer time, I
decided
> to
> > > use batch file in which I calling the wish83.exe with the tcl script
> file.

> > > In the TCL script, I use argv vasriable to open up files. Now I invoke
> > batch
> > > file, the argument variable goes with batch file.
> > > How to I redirect this argument variable to the tcl script. It looks
> more
> > > like Windows problem than TCL problem.

> > > I hope somebody would have had this problem and solved it.

> > > Thanks & Regards
> > > Kantha.

> > If the list of arguments is not too long, you might get away with
> something
> > like:

> > script.tcl %1 %2 %3 %4 %5 %6 %7 %8 %9

> > Depending on the version of windows, there may be other options
available,
> > too, but this is the simplest way I've seen. %1-9 refer to the first
> through
> > ninth arguments passed to the script.

> > --

> > When we attempt the impossible, we can experience true growth.



Sun, 09 Jan 2005 01:45:59 GMT  
 How to pass the argv variables from batch file to .tcl file

On Tue, 23 Jul 2002 12:05:52 -0500, "Valenite"

Quote:

>Hi,

>       Earlier I used to create stand alone executable for TCL files. Now
>that I find that invoking those executables take longer time, I decided to
>use batch file in which I calling the wish83.exe with the tcl script file.

Q) Why are your executables taking a longer time? Is your exec file
that large?  

Here are some things to consider:

If you are running Windows, then do you have ample RAM and Hard dRIVE
space for virtual memory?

Have you consider putting up a splash screen to give the user
something to look at, or a progress bar?

Best wishes

js

Quote:

>In the TCL script, I use argv vasriable to open up files. Now I invoke batch
>file, the argument variable goes with batch file.
>How to I redirect this argument variable to the tcl script. It looks more
>like Windows problem than TCL problem.

>I hope somebody would have had this problem and solved it.

>Thanks & Regards
>Kantha.

// signature ------------------------------------
Take the xxx out of my email address.

"Some will believe and rightly so, that there are other
forms of riches more desireable than money. Yes, there
are riches which can not be measured in terms of
dollars, but there are millions of people who will
say, 'Give me all the money I need, and I will find
everything else I want.' "
Napoleon Hill
See http://www.lifeforce-intl.com/134808

Improve your life, health and wealth awaits for you.
// ---------------------------------------------------



Mon, 10 Jan 2005 23:58:45 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to pass the argv variables from batch file to .tcl file

2. Help: Passing Parameters to Batch Files

3. Passing argc from c file to tcl file

4. Returning a variable to a batch file (DOS)

5. Assembly routine to use a crack on any file, as %1 in a batch file

6. Help : Launching a batch file from tcl under Windows

7. TCL Shell on the Mac to pass argc and argv

8. Pass a file label using a variable

9. Passing a FILE variable from PL1 to ASM

10. pass local variables to loaded file

11. file_get_contents passing variables in the file address

12. Query: Pass variable to DOS bat file

 

 
Powered by phpBB® Forum Software