running Tcl-Application from VBA 6.0

running Tcl-Application from VBA 6.0

Anonymous
Not applicable
742 Views
2 Replies
Message 1 of 3

running Tcl-Application from VBA 6.0

Anonymous
Not applicable
Hi,

I'd like to start a Tcl-Script from VBA. In the NT-Dos-Shell the following
command works properly :

" tclsh83 D:/TCL_Programme/test.tcl > D:/TCL_Programme/rest_0.txt "

The Vba-Code doesn't have any result:

Dim Ergebnis
Dim strName As String
strName= "D:/TCL_Programme/test.tcl > D:/TCL_Programme/rest_0.txt"
Ergebnis = Shell("tclsh83 & Space(1) & strName, 1)



Also using the SendKey-Method :
Ergebnis = Shell("tclsh83.exe ") // is successful
SendKeys "D:/TCL_Programme/test.tcl > D:/TCL_Programme/rest_0.txt", True
or even SendKeys "exit, True" in order to terminate doesn't work.

Any Ideas how surrender Parameteres to tcl83 ?

Thanx
0 Likes
743 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
On Wed, 8 Aug 2001 02:41:09 -0700, Arash.Aram@fujitsu-siemens.com (Arash
Aram) wrote:

» I'd like to start a Tcl-Script from VBA. In the NT-Dos-Shell the following
» command works properly :
»
» " tclsh83 D:/TCL_Programme/test.tcl > D:/TCL_Programme/rest_0.txt "
»
» The Vba-Code doesn't have any result:
»
» Dim Ergebnis
» Dim strName As String
» strName= "D:/TCL_Programme/test.tcl > D:/TCL_Programme/rest_0.txt"
» Ergebnis = Shell("tclsh83 & Space(1) & strName, 1)


Redirection is handled internally by the command interpreter. You need to
pass the entire string to a new instance of command.com or cmd.exe. Try
this:

Ergebnis = Shell(Environ$("ComSpec") & " " & _
"tclsh83" & Space(1) & strName, 1)



--
Paul Marshall
pmarshal@vulcraft-al.com
0 Likes
Message 3 of 3

Anonymous
Not applicable
> The Vba-Code doesn't have any result:
>
> Dim Ergebnis
> Dim strName As String
> strName= "D:/TCL_Programme/test.tcl > D:/TCL_Programme/rest_0.txt"
> Ergebnis = Shell("tclsh83 & Space(1) & strName, 1)
>

What about:

Ergebnis = Shell("tclsh83" & Space(1) & strName, 1)
0 Likes