Forum Discussion

maxthomassin's avatar
maxthomassin
Occasional Contributor
12 years ago

Using Command Line

Hey, im trying to use cmd line to run a specific script and later i will need to pass argument to the script. I've beent trying many line, but i think this one is the closest to the solu...
  • googleid_114358's avatar
    12 years ago

    Hi again Maxime.




     



    If you want to pass some parameters, you should take a look at the following page : 




    Here is an example you could use : 


    function CommandLineArgs()


    {


      var nArgs = BuiltIn.ParamCount();


      Log.Message("Total number of command-line arguments: " + nArgs);


      Log.Message("The fully-qualified name of the TestComplete executable: " + BuiltIn.ParamStr(0));


     


      for (var i = 1; i <= nArgs ; i++)


        Log.Message("Arg " + i + ": " + BuiltIn.ParamStr(i));


    }