Stewart, Just the person I need.

This should be a short one for you.

I am building data generation tools using Tcl/Tk, PL*SQL Scripts, SQL*PLUS
Scripts, Unix Shell Scripts, Perl Scripts, C++ Programs, C Programs Bla!
Bla! Bla!  All this on Sun Iron, big CWAN ...... lots of systems.....
35,000 + PC's Hundreds of dev boxes, Hundreds of Prod Systems, Bla! Bla!
Bla!
Not that it matters but I know your inquizitive, so here is the output of
"uname -a":
 SunOS cantaloup 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-Enterprise.

My work station is a PC using Exceed for my Xterms.
I want to migrate the Tcl/Tk tools I have developed to run from Netscape as
Tclet's.

I have the NASA Plugin working fine. Visual TCL also working fine. Using
wish8.2 Bla!, Bla!, Bla.

How do I execute shell scripts, programs, Tcl/Tk Scripts on the Unix boxes
from Netscape Tclet's Running on my PC.
Obviously I would like files 1 and 2 to end up in a local or global item,
as in

set command "Executable_Name_Goes_Here $p1 $p2 $p3"
set rpt [  read_pipe $command ]
.top2.text delete 1.0 end
.top2.text insert 1.0 "$rpt\n"

#--------------------------------------------------------------
# read_pipe will execute the command that was passed, and then
# return the piped output back to you.
#--------------------------------------------------------------
proc read_pipe { cmd } {
  # initialize
  global errorCode errorInfo
  set data   ""
  set errvar ""
  set fileid [ open "|$cmd" r ]
  if { $fileid != "" }  {
         #Read stdout and stderror
         set data [read $fileid]
         set err [ catch { close $fileid } $errvar ]
         if { $err > 1 } { tkerror $errvar }
         }
  return $data
  }

I got the "socket command to work" . It returns sock236 and like that.
I got the "tell command to work" it returns "-1".

So what's next?

I tried "set rpt [ read_pipe $command]"
but got nasty grams from Tcl.

A Network guy I'm not. So take it easy on me and keep it simple.
I've been a 'C' programmer for 25+ year's mostly on Unix systems and VMS.
I hate C++ and the whole OOP thing so don't go there, and if you think
"goto's" are ok, don't let me know you use em.
I think a lot of you right now, scale 1-10 your about a 50, If you think
goto's have any use at all, your rating will fall to like "-" something.
Help
Thanks!
[EMAIL PROTECTED]
407.771.5117


---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).

Reply via email to