Is it possible to get multiple output from a VBS in AA

dannyxiexie

New Member
I'm using AA to run a VBS, which include parameters and output.
However, it seems every time it can only return one output value to an AA variable.

Below is my VBS coding as example:

Dim a, b
a = WScript.Arguments.Item(0)
b = WScript.Arguments.Item(1)
WScript.Stdout.Writeline b
WScript.Stdout.Writeline a

In AA, I've tried $a$ $b¥, and $a$,$b$. Both not working.
Anyone knows how?
 

VJR

Well-Known Member
Hi dannyxiexie,

You can return an array with multiple values from a vbscript but see if the values from the array can the read comfortably from AA (either in a List variable or by individually accessing each of the the array elements).
Also you can think of having a separator character like $ or # which won't be a part of your original text and then split accordingly.
Both of these approaches are explained in the posts in this link.
https://stackoverflow.com/questions/3403581/qtp-how-can-i-return-multiple-values-from-a-function
 

dannyxiexie

New Member
Hi VJ,

Really appreciated for your advice.
I've tried the separator method and it works!
I'll try the array method later and post the result here, in case anyone else who get same issue in AA may get answers.
 

silpa

New Member
num1=WScript.Arguments.Item(0)
num2=WScript.Arguments.Item(1)
WScript.StdOut.WriteLine(num1)
WScript.StdOut.WriteLine(num2)

In AA, I've tried $num1$ $num2$, and $num1$,$num2$. Both not working. And also I've tried to sent 2 parameters for input that also not working

Anyone knows how?
 
Top