Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
var args = WScript.Arguments;
try{
if (args.length == 0) {
throw "No Argument";
} else {
WScript.Echo( "The first param is: "+args(0));
WScript.Echo( "The second param is: "+args(1));
}
}catch(e) {
WScript.Echo(e);
}
"cmd /c cscript function.js \"Hello\" \"World\""
Starting job forum6262 at 11:03 21/04/2009.
Microsoft (R) Windows Script Host Version 5.7
Copyright(C) Microsoft Corporation 1996-2001?All rights reserved?
The first param is: Hello
The second param is: World
Job forum6262 ended at 11:03 21/04/2009.
var args = WScript.Arguments;
try{
if (args.length == 0) {
throw "No Argument";
} else {
WScript.Echo( "The first param is: "+args(0));
WScript.Echo( "The second param is: "+args(1));
}
}catch(e) {
WScript.Echo(e);
}
"cmd /c cscript function.js \"Hello\" \"World\""
Starting job forum6262 at 11:03 21/04/2009.
Microsoft (R) Windows Script Host Version 5.7
Copyright(C) Microsoft Corporation 1996-2001?All rights reserved?
The first param is: Hello
The second param is: World
Job forum6262 ended at 11:03 21/04/2009.
And How can i pass the parameters from flat file to javascript function?
var args = WScript.Arguments;
try{
if (args.length == 0) {
throw "No Argument";
} else {
WScript.Echo( "The first param is: "+args(0));
WScript.Echo( "The second param is: "+args(1));
}
}catch(e) {
WScript.Echo(e);
}
"cmd /c cscript function.js "+(String)globalMap.get("row1.param1")+" "+(String)globalMap.get("row1.param2")
Starting job forum6262 at 11:17 21/04/2009.
Microsoft (R) Windows Script Host Version 5.7
Copyright(C) Microsoft Corporation 1996-2001?All rights reserved?
The first param is: a1
The second param is: a2
Microsoft (R) Windows Script Host Version 5.7
Copyright(C) Microsoft Corporation 1996-2001?All rights reserved?
The first param is: b1
The second param is: b2
Job forum6262 ended at 11:17 21/04/2009.