To use local variables with the switchto command, please do 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.
var z_filename = "test_guixt.sjs"; switchto = ["C:\\guixt\\" +z_filename];
var z_filename = ["C:\\guixt\\test\\test_guixt.sjs"]; switchto = [z_filename];