Using switchto with local variables

To use local variables with the switchto command, please do the following:

  1. Open the guixt.sjs file and enter the following:
    var z_filename = "test_guixt.sjs ";
    switchto = [z_filename];
              

    We have now specified a variable and assigned it a file path as a value. We can now use the variable in the switchto command instead of the file path.

    Note: For local variables, either the path or the file may be specified.
  2. If only the filename is specified and the user wishes to add it to an existing path in the switchto command, use the following code:
    var z_filename = "test_guixt.sjs";
    switchto = ["C:\\guixt\\" +z_filename];
            
  3. TO store an entire path in the variable, use the following example:
    var z_filename = ["C:\\guixt\\test\\test_guixt.sjs"];
    switchto = [z_filename];