| || |
I`m testing with TestComplete and the VBScribt language how to automaticate Windows usings.
I want to have a function in a separate existing scribt, that checks how many parameters in the function-call was delivered with and acts accordingly.
Does anybody know what I mean and how this could work?
Thanks for all answers...
Re: VBScribt Question
I guess, you want to create a routine with a variable number of parameters, right? There is no way to do this in VBScript, but you can pass parameters in an array and perform some actions in the code according to the number of items. For example:
<font class="small">Code:</font><hr /><pre>Sub VarParamNumber(params)
parCount = UBound(params) + 1
If parCount = 2 Then
ElseIf parCount = 3 Then
params(0) = "1"
params(1) = "2"
params(2) = "3"