Passing data between to WSH scripts? 
Author Message
 Passing data between to WSH scripts?

Hi.
I want to pass data between tow scripts. Is it possible in WSH?
I mean I have one base script which control live of my application and this
script call few another second level scripts which done some job. And this
main script need to know how that second level script done his job. Well, I
mean is it possible passing data between parent script and child script? I
know I can pass data to child script through parameters, but how can I
return something back? And is it possible fire some events from child
script?

PS: Sorry for stupid cuestions, but MSDN really poor describe this... :-((

--

Sincerely German
================
"I think there is a world market for maybe five computers." --Thomas
Watson, Chairman of IBM, 1943



Sun, 04 Jul 2004 18:47:32 GMT  
 Passing data between to WSH scripts?
Passing info to/from external scripts is pretty limited.  The external script can use WScript.Quit nnn to return an exit code.  It can also return info by writing to WScript.StdOut which can be trapped most easily by the calling script if you use the WshShell.Exec method and the related WshScriptExec object.

Rather than use called scripts (meaning they are executed via WshShell.Run or Exec), you might want to consider rewriting them as WSCs (Windows Script Components).  With a WSC, you create an instance of a COM object, call methods, get/set properties, etc. - you really aren't limited in what you pass or return.

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> Hi.
> I want to pass data between tow scripts. Is it possible in WSH?
> I mean I have one base script which control live of my application and this
> script call few another second level scripts which done some job. And this
> main script need to know how that second level script done his job. Well, I
> mean is it possible passing data between parent script and child script? I
> know I can pass data to child script through parameters, but how can I
> return something back? And is it possible fire some events from child
> script?

> PS: Sorry for stupid cuestions, but MSDN really poor describe this... :-((

> --

> Sincerely German
> ================
> "I think there is a world market for maybe five computers." --Thomas
> Watson, Chairman of IBM, 1943



Mon, 05 Jul 2004 08:56:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. passing arrays of data into scripts

2. How does a WSH pass a Variant array to a script

3. export outlook/exchange data to a .pst file with WSH script

4. Passing arguments into a WSH script.

5. Passing Data between pages

6. problem passing the data from ASP to a stored procedure in SQL7.0

7. problem passing data from ASP to a Stored procedure in SQL 7.0

8. pass data from vbscript to javascript

9. Passing Data from FORM to FORM

10. Pass Form Data into ModalDialog

11. passing data between applets and JScript

12. Passing data from child to parent (Please help)

 

 
Powered by phpBB® Forum Software