For Programmers: Free Programming Magazines  


Home > Archive > Tcl > February 2007 > Running shortcut to TCL script from Cmd Shell









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Running shortcut to TCL script from Cmd Shell
tman

2007-02-21, 7:15 pm

I run tcl scripts from Windows Cmd Shell
e.g.
1. open Cmd Shell
2. cd to where the Tcl script is
3. Run the tcl script
> tclsh myscript.tcl



If i now create a shortcut to that script.
Is it possible to run the shortcut?
The problem im having is that the shortcut is called "shortcut to
myscript.tcl.lnk"
When you run the following, it tries to execute the .lnk file and not
what it points to.
> tclsh "shortcut to myscript.tcl.lnk"


Is there a solution?

Darren New

2007-02-21, 7:15 pm

tman wrote:
>
> Is there a solution?


The shortcut isn't a Tcl file, so that won't run it.

The thing you want to try is
C> start myscript.tcl
or
C> start myscript.tcl.lnk
(I don't remember which.)

--
Darren New / San Diego, CA, USA (PST)
"I'm getting addicted to feet. Which is
bad, because they're like $5 a pound."
suchodj@wanadoo.fr

2007-02-22, 7:12 pm

On 21 Feb 2007 09:15:23 -0800, "tman" <del.wallace@gmail.com> wrote:

>I run tcl scripts from Windows Cmd Shell
>e.g.
>1. open Cmd Shell
>2. cd to where the Tcl script is
>3. Run the tcl script
>
>
>If i now create a shortcut to that script.
>Is it possible to run the shortcut?
>The problem im having is that the shortcut is called "shortcut to
>myscript.tcl.lnk"
>When you run the following, it tries to execute the .lnk file and not
>what it points to.
>
>Is there a solution?


the following tcl script " C:/a/help.tcl"
i put it in a variable
set ch C:/a/help.tcl
for me, the following works wherever i call it
eval exec [auto_execok start] $ch
(i am under tcl/tk 8.4.13 win xp family)
hope it helps
jerome

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com