No announcement yet.

"print" to screen of command window?

  • Filter
  • Time
  • Show
Clear All
new posts

  • "print" to screen of command window?

    I am writing a commandline program which requires a filename as input. I want to say "Hey, dummy, you forgot to supply the filename parameter". Since I wrote it, and I'm the only one who will use this program, I figure it's it's OK to call the user a dummy.

    I have searched my PBWin documentation and the FAQ for a way to write a message to the display screen and I've come to the conclusion that there is no instruction which allows me to do this in PBWin. Am I correct or am a dummy.


  • #2
    It depends on how/what you want to do.

    If the processing of the file is all you need, then a simple MSGBOX statement would do.

    If on the other hand you are going to have a dialog with other input and/or information then either a message box or a static control (Label) on the dialog would do the trick.
    Client Writeup for the CPA

    Links Page


    • #3
      You could try something like this at the start of your program..
      Function PbMain()
       Dim sTest$
       If command$ = "" Then
        sTest = INPUTBOX$("Gimme a filename dummy!", "Command Line missing", "Default.bas", 200, 200)
        sTest = Command$
       End If
        MsgBox sTest,,"Result"
      End Function
      Rgds, Dave


      • #4
        Steve --

        If I understand your goal, try the WriteConsole API. Sample code is provided in this thread:

        -- Eric
        "Not my circus, not my monkeys."


        • #5

          Simple STDOUT for PB/DLL and PB/Win 2-13-04

          And since you now have a STDOUT available, you can 'sex it up' with...

          Wait for key, click or clock for PB/WIN and PB/CC

          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]


          • #6
            Thanks to everyone who posted suggestions. All were helpful. I am very much appreciative of the willingness of you all to help those of us who are way behind the curve.


            • #7
              "Hey, dummy, you forgot to supply the filename parameter"
              And if the code gets away from your hands you could always use codes to convey a moment

              User Error:
              ID: 10 T
              Error Cause: Parameter Missing
              Remedy: Include File Name
              When in reality User ID 10 T spells out IDIOT
              (Although anyone that catches it, may not appreciate it, or they may start laughing)
              Engineer's Motto: If it aint broke take it apart and fix it

              "If at 1st you don't succeed... call it version 1.0"

              "Half of Programming is coding"....."The other 90% is DEBUGGING"

              "Document my code????" .... "WHYYY??? do you think they call it CODE? "