Re: transfering datas from a program to another
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Tue, 16 Jan 2007 15:25:23 -0600
"Youri Ligotmi" <yl@xxxxxxxxxxxxxxx> wrote in message
news:45ad4105$0$304$426a74cc@xxxxxxxxxxxxxxx
hi there
first of all I apologize for my bad english.
I've a problem, a vbs program (prog1.vbs) calls another one (prog2.vbs)
and passes datas to it.
The datas are strings, a problem occurs when there is a space in a data,
it's seen as 2 datas because the data separator is the space.
What is the solution for this problem?
example of my programs:
******** prog1.vbs *********
Set Shell = Wscript.CreateObject("Wscript.Shell")
data = InputBox("Data?","Data")
shell.run "prog2.vbs"&" "&data
****************************
******** prog2.vbs *********
wscript.echo args(0)
****************************
If I enter "AB" then "AB" is displayed
If I enter "A B" then only "A" is displayed
Please note that in the real life many datas are transfered from the 1st
program to the 2nd and in each of them it could have many space.
Thanks for your help
phil
Enclose each argument (parameter) that has spaces in
quotation marks; (i.e. Chr(34)).
For example,
shell.run "prog2.vbs" & " " & Chr(34) & data & Chr(34)
Presuming that the argument does not contain any quotes...
.
- Follow-Ups:
- Re: transfering datas from a program to another
- From: Youri Ligotmi
- Re: transfering datas from a program to another
- References:
- transfering datas from a program to another
- From: Youri Ligotmi
- transfering datas from a program to another
- Prev by Date: transfering datas from a program to another
- Next by Date: WSF file and function calls...
- Previous by thread: transfering datas from a program to another
- Next by thread: Re: transfering datas from a program to another
- Index(es):
Relevant Pages
|