No announcement yet.

Pb exe & non-Pb exe files

  • Filter
  • Time
  • Show
Clear All
new posts

  • Pb exe & non-Pb exe files

    File 1: PB 3.5 exe file, runs just fine.
    File 2: An exe file(not generated by Pb) prints to a Win printer.
    Works just fine too. Output to a Win display is just
    what I've been looking for to avoid parallel DOS printer.

    Working together is not going well.

    File 1 executes and sometimes just terminates without needing
    to use File 2. However, sometimes when needed it
    runs File 2 for output to a Win printer.

    A. Used 'RUN', 'SHELL' in File #1, Pb does not like this
    B. Wrote a bat file with File 1 and File 2, works fine if running
    File 2 is requested. But, if File 2 is not requested it
    excutes anyway.

    How do I run File 1 followed by File 2 when requested?
    How do I run File 1 and just terminate when requested?

    A gentle push in the right direction would be appreciated.

    Thanks, Jack


  • #2
    A simple method is to use an errorlevel and a batch file.

    For example, put "end 1" in your PB program if you don't want to run the other executable. Put "end 0" in your PB program where you do want to run the other executable.

    Then make a batch file that looks like this:

    if errorlevel 1 goto quit

    That's all there is to it.

    PB/DOS 3.5 on Fedora Linux


    • #3
      Wow, now that is service.

      Worked just great.

      Thanks, Jack