Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get variable from shell to main script ?

Status
Not open for further replies.

bolobaboo

MIS
Aug 4, 2008
120
US
Hi
I have script which runs shell.I want variable value back from that shell .. How to do following ?

THX

man.vbs
======
dim..
..
..
Shell.run "upd_exc_new.vbs"
..
newvalue = getvalue ' from other script"
..
wscript.quit


upd_exc_new.vbs
====
..
..
getvalue= number
..
..
wscript.end

 
Why can't you just have one script instead of 2? I am sure you can try workarounds to accomplish what you're asking, but if you can incorporate all the functionality into one...why not?

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Hi
dm4ever
main.vbs shows progress bar for other script. So i want progress bar to get new value from other script at specific interval.
Basically both script running at same time. Main script watching for chnages in variable and then showing status for other script.

Thank you.
 
Any body out there , who have done such thing and like to help other who stuck in MUD ?

Thank you
 
You could probably have the second script write values to a file or registry key and have the main script read those values. You might also try executing the second script using the Exec method of WScript.Shell, have the second script write it status using WScript.StdOut and have the main script read those values.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top