What is the run command of javascript?
hi everybody. i am a vb coder but i need to learn something in js.
when i run my js from start\run as
c:\sample.js param1
in which variable i can get the param1 value from js?
respects.
[221 byte] By [
Ramci] at [2007-11-19 23:06:18]

# 1 Re: What is the run command of javascript?
Hi,
Try this
WScript.Arguments.Item(0);
the param passed to Item is the index of the argument passed in. So 0 would be the first one, 1 the second and so on.
Hope this helps
Bnt at 2007-11-8 0:40:26 >

# 2 Re: What is the run command of javascript?
@Bnt, Ramci means if you run a JS file from the run dialog out of the Start menu.
You can't pass arguments when running the script from the run command. At least, I have never seen it done.