Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Check for Number of Parameters

Keywords:      param0

Question:

I have an executable that I want to always pass a parameter. How do I check to make sure a parameter is passed. When I define param1 and no parameter is passed, I receive an error because param1 is not defined. I want to check for param1 and display an error message.

Answer:

Param0 determines the number of parameters there are. If it's zero, none were passed. For example,
        if param0 == 0 then Message("Number of Parameters", "You have no Parameters")

In the tech support area, there is a sample script showing how to pass an unknown number of parameters.


Article ID:   W13908
Filename:   Param0 Shows How Many Parameters are Passed.txt