Menu

Capture output from external app

2006-02-06
2012-11-13
  • Nobody/Anonymous

    Can the output from an external app (compiler, parser etc..) be captured and pasted into a new blank document?

    I get a lovely DOS window (when running my apps through in perl) but it just closes and Im non-te-wise.

    I guess I will have to run a  batch file that does a 'pause' when perl.exe has finished but thats not very pretty and means I cant jump to line numbers on errors (as in TextPad which Im sure half of us are converting over from).

     
    • Paulius

      Paulius - 2006-02-06

      Currently, you can't do that with Notepad++. As you said - you must use batch script with pause command at the end of it.

      It isn't that bad as it sounds, though. In Notepad++ you can jump to a specific line by choosing "Search" -> "Go to line..." (default shortcut: CONTROL+G). So, when you have the console open with all the errors - open the file, hit CONTROL+G, enter the line number and hit ENTER.

       
      • Nobody/Anonymous

        Too bad Notepad++ cannot do it.
        However, I have a suggestion for you guys.

        If you are running a single command via commandline and don't want to use a batch file with pause, etc.,
        then just run the command line prefixed with cmd /k like this

        Suppose you want to run ipconfig from within notepad and see the output, then use

        cmd /k ipconfig

        This will launch a cmd window and not terminate it after the command executes.

        Hope this helps.

        Thanks.

         
        • Nobody/Anonymous

          I just found you can use NPPexec (included plugin) for this.
          Need some research to make it work like it does in Textpad.

           
    • Nobody/Anonymous

      You can use the IO redirector '>'

      This operator both works in DOS and UNIX.

      If you are running the script throw CommandLine than you just have to execute the folowing command:

      perl PerlScriptName > FileName

      PerlScriptName is the name of your perl script;

      FileName is the name of the file that will receive all the output generated from the perl script.

      If you aren't running from the command line you sure have to make a batch file.

       
    • Nobody/Anonymous

      Hi
      In my case, i launch notepad++ to open a text file from an external application and i would like to save the file into the external application.
      Only capturing output can do this, no?
      Thanks.
      Greg
      (Sorry  for my bad english)