{ alert("This script shows how one script can call another. The next alert you see, after closing this one, will come from a nested script."); // Here's all you do. // [1] Create file object for the file you want to run: var nested_file = new File("nested_script.jsx"); // [2] Open the file nested_file.open("r"); // [3] read the file and evaluate the results. That's it! eval( nested_file.read() ); alert("Test complete!"); }