Multiple Command Output Windows

Multiple Command Output Windows

2
NewbieNewbie
2

    Mar 18, 2008#1

    When scripting, and testing scripts, the command output window is really useful.

    Trouble is, I may be working on several scripts at once, and I end up getting several of these command output windows open.
    Is there any way to reuse the same command output window each time?

    Either one window per script file, or one window total, without having to close them manually each time?


    Forgot to mention, I'm using V14.0a

    262
    MasterMaster
    262

      Mar 26, 2008#2

      I'm not sure what you mean. In UE you have one "Output Window" for script output (like UltraEdit.outputWindow.write("foo") ) - but whenever you run a DOS command or a User Tool with the "Capture Output" option set a new "Command output window" is opened.

      A "Command output window" cannot as such be reused. But since they are ordinary editor windows (documents in script terms) you can setup your script to do some "housekeeping" and close unwanted "Command output windows" before a new window is created in by the script when a UserTool is invoked.

      Code: Select all

      for (var i=UltraEdit.document.length - 1;i >= 0 ;i--) {
        if(UltraEdit.document[i].path.substr(0,14) == 'Command Output') {
          UltraEdit.closeFile(UltraEdit.document[i].path,2);
        }
      }
      If you only want to close 'Command output' related to a certain script, then do a find (UltraEdit.document.findReplace.find("...")) for specific strings and close the files depending on the find result.

      2
      NewbieNewbie
      2

        Mar 27, 2008#3

        Thanks

        Your comments really helped, I was using the (F9) DOS command to launch my VBS scripts (using Cscript)

        Thanks to your comments, I looked at the tools section, created a tool to launch the file, and within there you have more control over the output.

        Bingo, it worked!

        Thanks very much