4.7.2. Setting up a scripting environment

If you are working on one script regularly and need to restart the DataHub instance often, here's a way to automatically open the Properties window, the Script Log and the Script Editor with your file loaded.

  1. Open the Properties window and Script Log.

  2. Position them on the screen, then close them. They will come up in the same place the next time you open them. (The Script Editor does not yet have this feature.)

  3. Write a script of these three lines:

        datahub_command ("(show_properties 1)");
        datahub_command ("(show_script_log 1)");
        edit_file ("c:\\projects\\myfile.g");

    Two slash marks (\\) are necessary—the first slash mark escapes the second one.

  4. Add this script to the list of scripts in the DataHub instance, and check the activation box beside it. Then next time you start DataHub instance, the properties and script log windows will come up where they were before, and an editor will be opened on the file c:\projects\myfile.g.

  5. When you don't want the script to auto-load, just un-check the activation box.