Announcement

Collapse
No announcement yet.

Execute BAS file from command-line

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

  • Execute BAS file from command-line

    I am new to PowerBasic and recently inherited support for
    an existing BAS program. Currently, the users launch PowerBasic,
    load the BAS file and then run it.

    Question: How can I execute the BAS file from the commandline
    to avoid having users opening up the source code everytime they
    need to run the program. I have observed users unintentionally
    change source code while trying to access menu items from the
    keyboard.


    PB: version 2.10f
    O/S: DOS 6.2


    ------------------

  • #2
    Originally posted by george kam:
    Question: How can I execute the BAS file from the commandline
    to avoid having users opening up the source code everytime they
    need to run the program. I have observed users unintentionally
    change source code while trying to access menu items from the
    keyboard.


    PB: version 2.10f
    O/S: DOS 6.2
    Don't !!!

    Buy a upgrade to 3.5 and compile it into a exe.

    Herman.


    ------------------
    You gotta run, and don't loop back.
    You gotta run, and don't loop back.

    Comment


    • #3
      Buy a upgrade to 3.5 and compile it into a exe.
      Um, no need to upgrade. PB never produced a PowerBASIC-brand <U>interpreter</U>.. all PB/DOS products will compile to an EXE file...

      Don't even want to think about the (probable?) license violations occurring here...

      MCM


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

      Comment


      • #4
        Don't even want to think about the (probable?) license violations occurring here...
        That was the very first thing that popped into my little brain!

        Doug


        ------------------
        You can either complain that rose bushes have thorns- or rejoice that thorn bushes have roses!
        There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance - that principle is contempt prior to investigation.

        Herbert Spencer

        Comment


        • #5
          I thought when you said that you had inherited support of a piece of software that
          was a in-house-development, but it is a third party product ??

          Theoreticly spoken, the users breach the copyright, as soon as they,
          unwanted or not, change the sources. And you as software-supporter are not
          allowed to change it back.
          And what is support ? I've had support where I had to change scripts,
          that were written by a third party, but when the scripts failed or had errors(a lot of times) I had
          to rewrite the scripts. This was allowed !!
          Check out the software conditions to find out what you are allowed to do !!

          Herman.



          ------------------
          You gotta run, and don't loop back.
          You gotta run, and don't loop back.

          Comment


          • #6
            Just wondering why on earth the previous support guy is gone... it seems a real shame to lose someone who set up a system which requires the users to load the source code and execute from the compiler's IDE....

            MCM


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

            Comment


            • #7
              My first thought was, "Not my leg!"

              The actual existence of a user group mindlessly running an app from the IDE since the days of PB/DOS 2.10f is a little far fetched.

              Unless George is on an island like the one in Jurrasic Park, I think this may be a leg pull.

              Most "newbies" don't use the trademarked spelling of "PowerBasic" and very few are precise about their software platform versions.

              ------------------
              Jim C.

              [This message has been edited by Jim Cody (edited October 15, 2003).]
              Jim C.

              Comment


              • #8


                [This message has been edited by Jim Cody (edited October 15, 2003).]
                Jim C.

                Comment


                • #9


                  [This message has been edited by Jim Cody (edited October 15, 2003).]
                  Jim C.

                  Comment


                  • #10
                    LOL - my 4th thought is visit the forum more often and stop clicking on reply with quote when edit is right beside it.

                    ------------------
                    Jim C.
                    Jim C.

                    Comment


                    • #11
                      The actual existence of a user group mindlessly running an app from the IDE since the days of PB/DOS 2.10f is a little far fetched.
                      You don't get out much, do you?

                      MCM


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

                      Comment


                      • #12
                        Mike,

                        You don't think that a job description that essentially describes a guy looping through a user community restoring corrupted PB 2.10f BAS files is far fetched?

                        If George's company is beating competitors, I would love to hear how the competition operates!

                        And, yes, since the second amputation, I don't get out very often <g>.
                        ------------------
                        Jim C.



                        [This message has been edited by Jim Cody (edited October 15, 2003).]
                        Jim C.

                        Comment


                        • #13
                          Given George the benefit of the doubt, simply compile the thing. That's what PB is designed to do. It produces EXEs.

                          ------------------

                          Comment


                          • #14
                            hey george,

                            at least you got to start off with some source code.
                            try reinventing the wheel.

                            not to mention deciferring data and data variables that make very little since at all,
                            laidout in all kinds of various ways.

                            since 1983, a challenge yes, but life should have been easier.
                            now i am finally getting what should have been, so keep those baby steps(learning)
                            going, and do not wait for a pat on the back.


                            that is what i had to do, because of some terrible programing by professional
                            paid programmers.
                            sometimes to do a job right you have to do it yourself and a lot of the times
                            you are better off, because you might end up with just what you wanted.

                            the skys the limit.
                            paul d purvis


                            ------------------


                            [This message has been edited by paul d purvis (edited October 15, 2003).]
                            p purvis

                            Comment


                            • #15
                              Yes, since PB came into my life, running in the IDE is nearly a
                              moot point. Only very infrequently for debuggung. Everything
                              else is command line compiles, and they spot 95% of my errors.

                              Back in the days of QB, I ran some things from the IDE because
                              they worked just fine that way, but either wouldn't compile, or
                              would make math mistakes (bad answers) after being compiled. It
                              was a hair-pulling state of affairs, and certainly didn't inspire
                              much overall confidence in the product.



                              ------------------
                              What can go wrong will go wrong.
                              Anything can go wrong.
                              What hasn't?!?!
                              What can go wrong will go wrong.
                              Anything can go wrong.
                              What hasn't?!?!

                              Comment


                              • #16
                                You don't think that a job description that essentially describes a guy looping through a user community restoring corrupted PB 2.10f BAS files is far fetched
                                Maybe near-fetched, but not far-fetched.

                                Ask anyone who is an independent consultant and goes to a lot of places if they haven't seen things which curl their hair. (Well, if one has any hair left).

                                Basically, people put up with anything that does not fight back; efficiency and common sense are frequently eschewed for expedience.

                                And the idea , "this is just a temporary thing, we'll fix that up later?" uh, uh: never happens: there is no such thing as a 'temporary' program or workaround.


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

                                Comment


                                • #17
                                  Mike,

                                  As a consultant, I would be reluctant to actually solve the problem that George described. Out of pure compassion, I would be hesitant to expose how patently ridiculous the situation is... why embarrass the staff that way?

                                  Until the app dies a natural death, I would be inclined to recommend a batch file startup that always restores a valid BAS file and then launches PB. This would let everyone avoid embarassment. Non-displayable comments in the batch file could explain this act of compassion to the next consultant in the pipeline! <g>

                                  ------------------
                                  Jim C.
                                  Jim C.

                                  Comment


                                  • #18
                                    Never be reluctant. You'd be surprised how many businesses actually
                                    get by that way, and will pay you well to help improve the situation.
                                    How does it help anyone to refrain from helping them? Leap in there.

                                    Carpe canem! ("Seize the dog!") Trust me, the dog will enjoy it at least
                                    as much as you will. Go for it. [Best applied to labradors or golden
                                    retrievers; seizing dobermans may void your warrantee. Parental discretion
                                    advised.]

                                    ------------------
                                    Tom Hanlin
                                    PowerBASIC Staff

                                    Comment


                                    • #19
                                      I must agree most emphatically wih Mr. Hanlin on this.

                                      I don't believe one should declare himself a 'consultant' unless ready, willing and able to confront real problems and offer real solutions.

                                      After all, the principal reason outside consultants are engaged is to provide management an objective view of 'what's happening' free of personality and office politics issues.

                                      A 'contractor' might reasonably avoid unpleasant situations and conflict, but puh-leeze don't claim to be a 'consultant' until you are ready to tackle the tough issues.

                                      (Oh, yeah, and be ready to handle it when those personality and office politics issues prevent implementation of new ideas).

                                      MCM
                                      Consultant

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

                                      Comment


                                      • #20
                                        "Question: How can I execute the BAS file from the commandline
                                        to avoid having users opening up the source code everytime they
                                        need to run the program. I have observed users unintentionally
                                        change source code while trying to access menu items from the
                                        keyboard?"

                                        Start PB, load the source. Press alt-c and make sure destination
                                        is set for exe. Then press alt-f9 this will compile the program into
                                        an executable. Set up a source directory on the users systems
                                        and move the source to that directory.
                                        Tell the users to type in the name of the program to run it.
                                        Charge hefty fee for streamlining use of program.
                                        KS

                                        ------------------

                                        Comment

                                        Working...
                                        X