Announcement

Collapse
No announcement yet.

Start Options of Pb.exe

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

  • Start Options of Pb.exe

    Hello,

    I´ve made a good seach program. It delivers the foundline, the
    line-number and the file-name. To edit the code quickly I need to make something like this:

    'pb file.bas /L:120 ': start editing file.bas at line 120 with pb

    Is this possible ?

    Thanks for advance.

    Regards

    Matthias Kuhn


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

  • #2
    Unfortunately, the PB.EXE IDE does not have such a command-line switch built into it. All command-line switches are described in the manual (/D, etc).

    I've never tried it, but you could try placing keystrokes (ALT+S,G, etc) into the keyboard buffer just as you launch PB.EXE?

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Hi Lance,

      thanks for the quick answere.

      I´ve tried it with keystokes - but You can only get in 15 stokes

      and this is to less:

      PB file:8digit enter alt-S G Backspace Number:3Digit enter

      and it is a little bit heavy to change the differtent filename und
      numbers to a scancode - format

      By

      Matthias

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

      Comment


      • #4
        How about writing a TSR to pump the keystrokes in with POPUP STUFF ?

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          After some thought, I think the best idea would be to use DOSBOX, it has a command-line mode with the ability to stuff up to 999 keystrokes into that app's keyboard buffer.

          http://www.powerbasic.com/products/dosbox/




          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment


          • #6
            Thanks,

            Lance for answere but I´m using pure Dos )???

            Regards

            Matthias Kuhn

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

            Comment


            • #7
              How about the TSR approach then?

              ------------------
              Lance
              PowerBASIC Support
              mailto:[email protected][email protected]</A>
              Lance
              mailto:[email protected]

              Comment


              • #8
                Hi Lance,

                You give never up or ?

                I've tested

                popup stuff "Test",0,0

                but nothing happend

                ?popup(3) is always zero.

                dummy&=(-500000) before has no effect
                popup quiet 1092 before - the same.

                I`m using Dos mode of Win 95 ver 4.00.1111. and Dos-Window.

                Greetings

                Matthias



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

                Comment


                • #9
                  Try the following code. When launched, it waits for second then stuffs the keyboard buffer.

                  I tried this in a DOS box in Windows 2000: Ran it from the command line, then (quickly!) typed PB and waited. Shortly after, "Hello World" appeared.

                  Interestingly, POPUP(3) returns zero for me too (I suspect that is an NTVDM "feature" as the actual DOS window obviously does not use the BIOS keyboard buffer!), but the keystuff routine still works.

                  Let me know how you get on.

                  Thanks!

                  Code:
                  $compile exe
                  locate 1,1
                  print "starting!" popup(3)
                  popup timer 1092
                  dummy = setmem(-600000)
                  popup sleep using ems, "c:\pbswap.$$$"
                    locate 2,1
                    print "Done!"
                    popup stuff "Hello World", 100, 10
                    popup sleep
                  end

                  ------------------
                  Lance
                  PowerBASIC Support
                  mailto:[email protected][email protected]</A>
                  Lance
                  mailto:[email protected]

                  Comment


                  • #10
                    There is a method for enlarging the keyboard buffer, but I'll
                    have to dig it out. Haven't used it for years. Also, I used to
                    have a little app. that did this & could do all sorts of other
                    clever things, like waiting until a certain character appeared
                    in a certain place on screen before doing its stuff. Used it to
                    automate closedown on an EPOS system about ten years ago.
                    Its on a 360K floppy somewhere...
                    If anybody is interested, I'll look for it. Email me at:
                    [email protected]


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

                    Comment


                    • #11
                      Thanks Lance

                      for the help.

                      Following Code works for my pogram:

                      $compile exe
                      popup timer 10
                      dummy = setmem(-600000)
                      popup sleep using ems, "c:\pbswap.$$$"
                      ' pb.exe s1.bas enter alt-S Goto Backspace 'Line10 enter
                      stuf$="pb c:\pb3\star\s1"+chr$(13)+chr$(0,0,31)+"G"+chr$(8)+_
                      " 10"+chr$(13)
                      popup stuff stuf$,0,0
                      popup sleep
                      end


                      Regards

                      Matthias Kuhn

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

                      Comment


                      • #12
                        I am using a Focus Electronic keyboard (the type with a built-in
                        calculator, and it has 12 programmable keys.

                        IF Matthias wanted to go to the same line each time, he can use
                        a keyboard similar to this and program a key to:
                        1. Open PB
                        2. Open filename.bas
                        3. Open Search
                        4. 120 (Search for line 120)

                        But I wouldn't have it auto start at 120, I would have step four
                        <U>ASK</U> me what line and I wanted, enter the line, and let it take
                        me there.

                        With a little ingenuity, you can really program this keyboard to
                        do a lot for you!! I am so used to this keyboard that I cannot
                        imagine programming without it!

                        And no, I am not anyway connected with selling these keyboards.


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


                        [This message has been edited by Robert Carneal (edited October 26, 2001).]

                        Comment


                        • #13
                          Robert, do you have a URL for the manufacturer of those keyboards, please?

                          They sound interesting (although the calculator won't replace my trusty old Ti58C).

                          Thanks!

                          ------------------
                          Lance
                          PowerBASIC Support
                          mailto:[email protected][email protected]</A>
                          Lance
                          mailto:[email protected]

                          Comment

                          Working...
                          X