Jump to content
Sign in to follow this  
jhbell

Command Line Parameters

Recommended Posts

jhbell

Suggest you add "Command Line Parameters" to the list of Help Contents and Index Terms. I looked for this for over a day until I found it buried in "running Scripts" .. might help the next guy!

Share this post


Link to post
Share on other sites
ezzetabi

it is there already, is not?

$cmdline[0] contains the number of params passed

$cmdline[x] contains the params

In the lastest version or the maybe the next one will also have a $rawcmdline...

Share this post


Link to post
Share on other sites
jhbell

I'm talking about the Contents and Index Tabs on the Help file so that you can find the writeup.

Also the write-up itself needs expansion.. if you do not use a parameter then the $CmdLine array is NOT Initialized. So if you want to have a default value for a parameter you need the following code:

If $CmdLine[0] = "" Then

Dim $CMDLine[5]

$CMDLine[1]= "default"

EndIf

Share this post


Link to post
Share on other sites
trids

I have to agree :blush: .. I forgot the name of $CmdLine recently :ph34r: and couldn't find it in the helpfile - had to find a previous script I'd written :(

It would certainly be v useful if it could have it's own topic, especially if it could be found when you search for such things as commandline.

Please :lol:

Share this post


Link to post
Share on other sites
ezzetabi

Also the write-up itself needs expansion.. if you do not use a parameter then the $CmdLine array is NOT Initialized.

Untrue, actually $CmdLine[0] is always started. At most it is set to 0.

Share this post


Link to post
Share on other sites
SlimShady

Suggest you add "Command Line Parameters" to the list of Help Contents and Index Terms. I looked for this for over a day until I found it buried in "running Scripts" .. might help the next guy!

I agree.

Share this post


Link to post
Share on other sites
Davman

I had problems finding it as well >.< oh well... thank gawd for this forum.


Sitting comfortably behind the code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.