Announcement

Collapse
No announcement yet.

Running MS-Editor through Shell

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running MS-Editor through Shell


    Is it possible (under the WinXP DOS terminal) to run the following line in PB?:

    SHELL "edit file.txt"

    I receive the message "Out of far memory"
    Can I increase this memory availablity?

    As an alternative & PREFERRED option: Does anyone know where I can find code for a barebones text editor written in BASIC?

    Thanks!!

    ------------------
    Dan N
    Dan N

  • #2
    SHELL "notepad.exe filename"

    (Yes, you can SHELL a Windows program from your DOS program)

    That should handle the out of far memory thing, about which you can do nothing anyway.
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      As much as I hate leaving the DOS terminal, that certainly does work nicely!
      Thanks!!

      ------------------
      Dan N
      Dan N

      Comment


      • #4
        Well, except that it has trouble restoring back to screen mode 12 after using notepad...

        ------------------
        Dan N
        Dan N

        Comment


        • #5
          >Well, except that it has trouble restoring back to screen mode 12

          Good old MS-DOS BASIC...
          Code:
            DEF SEG
            BSAVE
            DEF SEG
            SHELL
            SCREEN 
            DEF SEG
            BLOAD
            DEF SEG
          Michael Mattias
          Tal Systems Inc. (retired)
          Racine WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            Thanks again, Michael!!
            I'm trying to redraw the screen when Notepad closes, but if this is done before the DOS window restores, it crashes the program (because the window is still minimized).
            To avoid this, the program waits on a key press from the user as it is now, but a nicer method would be for the program itself to just wait until the window is restored, then start up.
            Do you know of any possible way to do this?

            ------------------
            Dan N
            Dan N

            Comment


            • #7
              Determine if the DOS Command Prompt "window" is minimized? Or when it is "back?" Using PB-DOS?

              You win, I'm stumped.

              BTW, are you SURE this "minimized command prompt" is the problem? It's awfully hard to tell from your code.

              Then again, I wouldn't bet a lot that DEF SEG will always work on every version of Windows-Fake-DOS.

              Michael Mattias
              Tal Systems Inc. (retired)
              Racine WI USA
              [email protected]
              http://www.talsystems.com

              Comment

              Working...
              X