TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: All
from: Rich
date: 2005-03-17 10:07:28
subject: Re: Handle is invalid

From: "Rich" 

This is a multi-part message in MIME format.

------=_NextPart_000_0045_01C52AD9.20C3F470
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

   Use cscript and create a pipe in your java app to capture the output.

   Don't use Java and use script only.

Rich

  "Adam"  wrote in message =
news:4239b0a2$1{at}w3.nls.net...
  If I'm using WScript, how do I print to console given:

  " The StdOut property returns a write-only TextStream object that=20
  outputs text to the Standard Output stream. This property is read only =

  and can only be used when cscript is the host executable. If you =
attempt=20
  to use this property when running a script under wscript, an "Invalid=20
  handle" error will be generated."


  I just want to be able to pick up the return as a std inputstream from =

  my java calling app given the code =3D

  var xmldoc =3D new ActiveXObject("Msxml2.DOMDocument.4.0");
  xmldoc.async =3D false;
  xmldoc.load(WScript.Arguments(0));
  var resultstring =3D new String();

  if(xmldoc.parseError.errorCode !=3D 0){
  resultstring =3D "Problem found with "+ WScript.Arguments(0)
+"\n"
  +"Error Code =3D "+ xmldoc.parseError.errorCode + "\n"
  +"Reason =3D "+ xmldoc.parseError.reason + "\n"
  +"File Position =3D "+ xmldoc.parseError.filepos + "\n"
  +"line =3D "+ xmldoc.parseError.line + "\n"
  +"linepos =3D "+ xmldoc.parseError.linepos + "\n"
  +"srcText =3D "+ xmldoc.parseError.srcText + "\n"
  +"url =3D "+ xmldoc.parseError.url=20
  ;
  }

  else
  {resultstring =3D "no problems!";}
  //WScript.Echo(resultstring);
  //WScript.StdOut.Write(resultstring);

  I want to get resultstring back...........

  Any ideas ?

  Adam
------=_NextPart_000_0045_01C52AD9.20C3F470
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable








   Use
cscript and create a =
pipe in your=20
java app to capture the output.
 
   Don't use
Java and use =
script=20
only.
 
Rich
 

  "Adam" <acompletemystery{at}somewhere=">mailto:acompletemystery{at}somewhere.org">acompletemystery{at}somewhere=
.org>=20
  wrote in message news:4239b0a2$1{at}w3.nls.net...If=20
  I'm using WScript, how do I print to console given:" The =
StdOut=20
  property returns a write-only TextStream object that outputs text =
to the=20
  Standard Output stream. This property is read only and can only be =
used=20
  when cscript is the host executable. If you attempt to use this =
property=20
  when running a script under wscript, an "Invalid
handle" error =
will be=20
  generated."I just want to be able to
pick up the return as =
a std=20
  inputstream from my java calling app given the code
=3Dvar =
xmldoc =3D=20
  new ActiveXObject("Msxml2.DOMDocument.4.0");xmldoc.async =3D=20
  false;xmldoc.load(WScript.Arguments(0));var resultstring =3D =
new=20
  String();if(xmldoc.parseError.errorCode !=3D =
0){resultstring =3D=20
  "Problem found with "+ WScript.Arguments(0)
+"\n"+"Error Code =3D =
"+=20
  xmldoc.parseError.errorCode + "\n"+"Reason =3D "+ =
xmldoc.parseError.reason +=20
  "\n"+"File Position =3D "+
xmldoc.parseError.filepos + =
"\n"+"line =3D "+=20
  xmldoc.parseError.line + "\n"+"linepos =3D "+ =
xmldoc.parseError.linepos +=20
  "\n"+"srcText =3D "+
xmldoc.parseError.srcText + "\n"+"url =3D =
"+=20
  xmldoc.parseError.url
;}else{resultstring =3D
"no=20
  =
problems!";}//WScript.Echo(resultstring);//WScript.StdOut.Write(r=
esultstring);I=20
  want to get resultstring back...........Any ideas=20
?Adam

------=_NextPart_000_0045_01C52AD9.20C3F470--

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.