Loading ...
Sorry, an error occurred while loading the content.

FILES

Expand Messages
  • David
    Anyone out there; put file names into a running program? What I would like to do is list files and put Make; Delete; or Read file of data. Dave
    Message 1 of 16 , Jan 15, 2013
    • 0 Attachment
      Anyone out there; put file names into a running program?

      What I would like to do is list files and put Make; Delete; or Read file of data.


      Dave
    • Gary Passmore
      Have you reviewed the Help Files in this regard? It might be Help -ful. ...from the world according to GaRPMorE   ________________________________ From:
      Message 2 of 16 , Jan 15, 2013
      • 0 Attachment
        Have you reviewed the Help Files in this regard? It might be "Help"-ful.
        ...from the world according to GaRPMorE
         

        ________________________________
        From: David <ageed18@...>
        To: libertybasic@yahoogroups.com
        Sent: Tuesday, January 15, 2013 2:08 PM
        Subject: [libertybasic] FILES


         

        Anyone out there; put file names into a running program?

        What I would like to do is list files and put Make; Delete; or Read file of data.

        Dave




        [Non-text portions of this message have been removed]
      • Bellsouth Inc
        I want to make 5 vertical columns for Morse code practice. I want to open a file, write to that file, then close it. More over, I want to use this little
        Message 3 of 16 , May 31, 2013
        • 0 Attachment
          I want to make 5 vertical columns for Morse code practice.

          I want to open a file, write to that file, then close it. More over, I want to use this little program to make a finished paper, no editing.
          I want to send it directly to Word and pic a font Courier New.
          Can I send this file directly to Word? - WA3IUI Kurt

          More over I want straight vertical columns no wavies.


           N = 99999

            For K= 1 to 5

            Print K;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+1;:Print"  ";:Print Int(Rnd(1)* N)+5

            Next K

           Stop: End

          1  76137  46934  1866  85121  41629
          2  77707  71673  68669  39734  11453
          3  50894  79736  41010  29199  35444
          4  90691  89876  87255  8590  89489
          5  68540  66600  29458  3911  64844


















          [Non-text portions of this message have been removed]
        • Bellsouth Inc
          OK I did it! No laughing.  THis will send 30 lines of Morse Code numbers to a file.  Can I pic a font and send it to a Word text file? Kurt  N = 99999  
          Message 4 of 16 , May 31, 2013
          • 0 Attachment
            OK I did it! No laughing.  THis will send 30 lines of Morse Code numbers to a file.  Can I pic a font and send it to a Word text file?
            Kurt

             N = 99999
              Print "Send this stuff to a disk file called MorseCode"

               Open "MorseCode.txt" for output as #1
              For K= 1 to 30

              Rem Print K;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+1;:Print"  ";:Print Int(Rnd(1)* N)+5
              Print #1,K;:Print #1, "  ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, "  ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, "  ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, "  ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, "  ";:Print #1, Int(Rnd(1)* N)+5

              Next K
              Close #1
                Print "End"


            --- On Fri, 5/31/13, Bellsouth Inc <rij4360@...> wrote:

            From: Bellsouth Inc <rij4360@...>
            Subject: Re: [libertybasic] FILES
            To: libertybasic@yahoogroups.com
            Date: Friday, May 31, 2013, 8:10 PM
















             









            I want to make 5 vertical columns for Morse code practice.



            I want to open a file, write to that file, then close it. More over, I want to use this little program to make a finished paper, no editing.

            I want to send it directly to Word and pic a font Courier New.

            Can I send this file directly to Word? - WA3IUI Kurt



            More over I want straight vertical columns no wavies.



             N = 99999



              For K= 1 to 5



              Print K;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+5;:Print"  ";:Print Int(Rnd(1)*N)+1;:Print"  ";:Print Int(Rnd(1)* N)+5



              Next K



             Stop: End



            1  76137  46934  1866  85121  41629

            2  77707  71673  68669  39734  11453

            3  50894  79736  41010  29199  35444

            4  90691  89876  87255  8590  89489

            5  68540  66600  29458  3911  64844



            [Non-text portions of this message have been removed]



























            [Non-text portions of this message have been removed]
          • Stefan Pendl
            ... Why do you want to create a word document? Word documents are hard to create anyways. You can omit the repeated :Print #1, sequence to get a shorter line
            Message 5 of 16 , May 31, 2013
            • 0 Attachment
              Am 01.06.2013 04:11, schrieb Bellsouth Inc:
              > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?
              > Kurt
              >
              > N = 99999
              > Print "Send this stuff to a disk file called MorseCode"
              >
              > Open "MorseCode.txt" for output as #1
              > For K= 1 to 30
              >
              > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5
              > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5
              >
              > Next K
              > Close #1
              > Print "End"
              >

              Why do you want to create a word document?
              Word documents are hard to create anyways.

              You can omit the repeated ":Print #1," sequence to get a shorter line of
              code.

              Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";
              Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5

              You can use the line continuation character too.

              Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _
              Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _
              Int(Rnd(1)*N)+5



              --
              Stefan Pendl
              http://stefanpendl.runbasichosting.com/

              LB 4.04 Pro ... http://www.libertybasic.com/assist.html
              LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

              LB Community Wiki .............. http://basic.wikispaces.com/
              LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
              LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

              Books at http://www.lulu.com/ and http://www.amazon.com/
              Alyce Watson ... APIs for Liberty BASIC
              Carl Gundel .... Beginning Programming with Liberty BASIC

              Windows 7 Home Premium 64-bit SP1
              AMD Turion X2 RM-70 2GHz, 4GB RAM
            • Bellsouth Inc
              Thank u Stefan, very decent of you to point out short cuts. Kurt ... From: Stefan Pendl Subject: Re: [libertybasic] FILES To:
              Message 6 of 16 , Jun 1, 2013
              • 0 Attachment
                Thank u Stefan, very decent of you to point out short cuts.
                Kurt

                --- On Sat, 6/1/13, Stefan Pendl <pendl2megabit@...> wrote:

                From: Stefan Pendl <pendl2megabit@...>
                Subject: Re: [libertybasic] FILES
                To: libertybasic@yahoogroups.com
                Date: Saturday, June 1, 2013, 2:58 AM
















                 









                Am 01.06.2013 04:11, schrieb Bellsouth Inc:

                > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?

                > Kurt

                >

                > N = 99999

                > Print "Send this stuff to a disk file called MorseCode"

                >

                > Open "MorseCode.txt" for output as #1

                > For K= 1 to 30

                >

                > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5

                > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5

                >

                > Next K

                > Close #1

                > Print "End"

                >



                Why do you want to create a word document?

                Word documents are hard to create anyways.



                You can omit the repeated ":Print #1," sequence to get a shorter line of

                code.



                Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";

                Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5



                You can use the line continuation character too.



                Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _

                Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _

                Int(Rnd(1)*N)+5



                --

                Stefan Pendl

                http://stefanpendl.runbasichosting.com/



                LB 4.04 Pro ... http://www.libertybasic.com/assist.html

                LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe



                LB Community Wiki .............. http://basic.wikispaces.com/

                LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/

                LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/



                Books at http://www.lulu.com/ and http://www.amazon.com/

                Alyce Watson ... APIs for Liberty BASIC

                Carl Gundel .... Beginning Programming with Liberty BASIC



                Windows 7 Home Premium 64-bit SP1

                AMD Turion X2 RM-70 2GHz, 4GB RAM

























                [Non-text portions of this message have been removed]
              • Stefan Pendl
                ... Kurt, would you mind describing the need of creating a Word document for the Morse code? -- Stefan Pendl http://stefanpendl.runbasichosting.com/ LB 4.04
                Message 7 of 16 , Jun 1, 2013
                • 0 Attachment
                  Am 01.06.2013 15:45, schrieb Bellsouth Inc:
                  > Thank u Stefan, very decent of you to point out short cuts.
                  > Kurt
                  >

                  Kurt,

                  would you mind describing the need of creating a Word document for the
                  Morse code?


                  --
                  Stefan Pendl
                  http://stefanpendl.runbasichosting.com/

                  LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                  LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                  LB Community Wiki .............. http://basic.wikispaces.com/
                  LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                  LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                  Books at http://www.lulu.com/ and http://www.amazon.com/
                  Alyce Watson ... APIs for Liberty BASIC
                  Carl Gundel .... Beginning Programming with Liberty BASIC

                  Windows 7 Home Premium 64-bit SP1
                  AMD Turion X2 RM-70 2GHz, 4GB RAM
                • paradisejb
                  ... Yes. I wonder the same thing. Especially since you can do everything you want to do, including setting the font and printing out the results, from within
                  Message 8 of 16 , Jun 1, 2013
                  • 0 Attachment
                    >
                    > would you mind describing the need of creating a Word document for the
                    > Morse code?
                    >
                    >
                    > --
                    > Stefan Pendl

                    Yes. I wonder the same thing. Especially since you can do everything you want to do, including setting the font and printing out the results, from within JB...
                  • Harry
                    I ve found the easiest way to create formatted documents with columns, font styles, para styles, embedded images and such from LB is to have the LB program
                    Message 9 of 16 , Jun 2, 2013
                    • 0 Attachment
                      I've found the easiest way to create formatted documents with columns, font styles, para styles, embedded images and such from LB is to have the LB program write/format the output as an HTML doc. For your 5-columns application, a table with 5 columns will have the same tags in each table row, and justification and styles for each column can be embedded in the various column tags <TD ...>, or classes can be created in the header block and the classes embedded in the tags as needed. The repeated blocks and tags can be held in string variables, rather than literals, too,to make reformatting the document easy.

                      Once the document is created and opened in a browser, the document data, columns, styles and all, are easily pasted pretty reliably into Word (or most word processing apps)or Excel (or most spreadsheet apps) or written/printed to a PDF, however you need it. Or Word will directly open an html doc pretty reliably.

                      If you need your program to then open and display the output, you can use RUN "[your browser/Word/whatever path-your document]". Of if you need various users to be able to see the output displayed, and you won't know what their default browser (or whatever) may be, Alyce's API book has a couple of routines that work slick for opening docs in their user-default applications.

                      --- In libertybasic@yahoogroups.com, Bellsouth Inc <rij4360@...> wrote:
                      >
                      > Thank u Stefan, very decent of you to point out short cuts.
                      > Kurt
                      >
                      > --- On Sat, 6/1/13, Stefan Pendl <pendl2megabit@...> wrote:
                      >
                      > From: Stefan Pendl <pendl2megabit@...>
                      > Subject: Re: [libertybasic] FILES
                      > To: libertybasic@yahoogroups.com
                      > Date: Saturday, June 1, 2013, 2:58 AM
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >  
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      > Am 01.06.2013 04:11, schrieb Bellsouth Inc:
                      >
                      > > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?
                      >
                      > > Kurt
                      >
                      > >
                      >
                      > > N = 99999
                      >
                      > > Print "Send this stuff to a disk file called MorseCode"
                      >
                      > >
                      >
                      > > Open "MorseCode.txt" for output as #1
                      >
                      > > For K= 1 to 30
                      >
                      > >
                      >
                      > > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5
                      >
                      > > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5
                      >
                      > >
                      >
                      > > Next K
                      >
                      > > Close #1
                      >
                      > > Print "End"
                      >
                      > >
                      >
                      >
                      >
                      > Why do you want to create a word document?
                      >
                      > Word documents are hard to create anyways.
                      >
                      >
                      >
                      > You can omit the repeated ":Print #1," sequence to get a shorter line of
                      >
                      > code.
                      >
                      >
                      >
                      > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";
                      >
                      > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5
                      >
                      >
                      >
                      > You can use the line continuation character too.
                      >
                      >
                      >
                      > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _
                      >
                      > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _
                      >
                      > Int(Rnd(1)*N)+5
                      >
                      >
                      >
                      > --
                      >
                      > Stefan Pendl
                      >
                      > http://stefanpendl.runbasichosting.com/
                      >
                      >
                      >
                      > LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                      >
                      > LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
                      >
                      >
                      >
                      > LB Community Wiki .............. http://basic.wikispaces.com/
                      >
                      > LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                      >
                      > LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
                      >
                      >
                      >
                      > Books at http://www.lulu.com/ and http://www.amazon.com/
                      >
                      > Alyce Watson ... APIs for Liberty BASIC
                      >
                      > Carl Gundel .... Beginning Programming with Liberty BASIC
                      >
                      >
                      >
                      > Windows 7 Home Premium 64-bit SP1
                      >
                      > AMD Turion X2 RM-70 2GHz, 4GB RAM
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                    • Sarmed N.
                      ... Dear Harry, Is this a real program? have any link to it? Or it s just a thought? Regards, Sarmed ________________________________ From: Harry
                      Message 10 of 16 , Jun 2, 2013
                      • 0 Attachment
                        > the LB program write/format the output as an HTML doc.


                        Dear Harry,


                        Is this a real program? have any link to it?

                        Or it's just a thought?


                        Regards,
                        Sarmed



                        ________________________________
                        From: Harry <harrybee99@...>
                        To: libertybasic@yahoogroups.com
                        Sent: Sunday, June 2, 2013 10:32 PM
                        Subject: [libertybasic] Re: FILES



                         
                        I've found the easiest way to create formatted documents with columns, font styles, para styles, embedded images and such from LB is to have the LB program write/format the output as an HTML doc. For your 5-columns application, a table with 5 columns will have the same tags in each table row, and justification and styles for each column can be embedded in the various column tags <TD ...>, or classes can be created in the header block and the classes embedded in the tags as needed. The repeated blocks and tags can be held in string variables, rather than literals, too,to make reformatting the document easy.

                        Once the document is created and opened in a browser, the document data, columns, styles and all, are easily pasted pretty reliably into Word (or most word processing apps)or Excel (or most spreadsheet apps) or written/printed to a PDF, however you need it. Or Word will directly open an html doc pretty reliably.

                        If you need your program to then open and display the output, you can use RUN "[your browser/Word/whatever path-your document]". Of if you need various users to be able to see the output displayed, and you won't know what their default browser (or whatever) may be, Alyce's API book has a couple of routines that work slick for opening docs in their user-default applications.

                        --- In libertybasic@yahoogroups.com, Bellsouth Inc <rij4360@...> wrote:
                        >
                        > Thank u Stefan, very decent of you to point out short cuts.
                        > Kurt
                        >
                        > --- On Sat, 6/1/13, Stefan Pendl <pendl2megabit@...> wrote:
                        >
                        > From: Stefan Pendl <pendl2megabit@...>
                        > Subject: Re: [libertybasic] FILES
                        > To: libertybasic@yahoogroups.com
                        > Date: Saturday, June 1, 2013, 2:58 AM
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >  
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        > Am 01.06.2013 04:11, schrieb Bellsouth Inc:
                        >
                        > > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?
                        >
                        > > Kurt
                        >
                        > >
                        >
                        > > N = 99999
                        >
                        > > Print "Send this stuff to a disk file called MorseCode"
                        >
                        > >
                        >
                        > > Open "MorseCode.txt" for output as #1
                        >
                        > > For K= 1 to 30
                        >
                        > >
                        >
                        > > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5
                        >
                        > > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5
                        >
                        > >
                        >
                        > > Next K
                        >
                        > > Close #1
                        >
                        > > Print "End"
                        >
                        > >
                        >
                        >
                        >
                        > Why do you want to create a word document?
                        >
                        > Word documents are hard to create anyways.
                        >
                        >
                        >
                        > You can omit the repeated ":Print #1," sequence to get a shorter line of
                        >
                        > code.
                        >
                        >
                        >
                        > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";
                        >
                        > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5
                        >
                        >
                        >
                        > You can use the line continuation character too.
                        >
                        >
                        >
                        > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _
                        >
                        > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _
                        >
                        > Int(Rnd(1)*N)+5
                        >
                        >
                        >
                        > --
                        >
                        > Stefan Pendl
                        >
                        > http://stefanpendl.runbasichosting.com/
                        >
                        >
                        >
                        > LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                        >
                        > LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
                        >
                        >
                        >
                        > LB Community Wiki .............. http://basic.wikispaces.com/
                        >
                        > LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                        >
                        > LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
                        >
                        >
                        >
                        > Books at http://www.lulu.com/ and http://www.amazon.com/
                        >
                        > Alyce Watson ... APIs for Liberty BASIC
                        >
                        > Carl Gundel .... Beginning Programming with Liberty BASIC
                        >
                        >
                        >
                        > Windows 7 Home Premium 64-bit SP1
                        >
                        > AMD Turion X2 RM-70 2GHz, 4GB RAM
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        > [Non-text portions of this message have been removed]
                        >




                        [Non-text portions of this message have been removed]
                      • Sarmed N.
                        ... Dear LB Group, I still asking if anyone knows is this a real program Harry point to, which I never heard about. Or it s only an idea, my be I am not able
                        Message 11 of 16 , Jun 3, 2013
                        • 0 Attachment
                          >  is to have the LB program write/format the output as an HTML doc.

                          Dear LB Group,

                          I still asking if anyone knows is this a real program Harry point to, which I never heard about.
                          Or it's only an idea, my be I am not able to understand the meaning.
                          Please explain.

                          Thanks to all of you.
                          Sarmed Nafi'


                          ________________________________
                          From: Harry <harrybee99@...>
                          To: libertybasic@yahoogroups.com
                          Sent: Sunday, June 2, 2013 10:32 PM
                          Subject: [libertybasic] Re: FILES



                           
                          I've found the easiest way to create formatted documents with columns, font styles, para styles, embedded images and such from LB is to have the LB program write/format the output as an HTML doc. For your 5-columns application, a table with 5 columns will have the same tags in each table row, and justification and styles for each column can be embedded in the various column tags <TD ...>, or classes can be created in the header block and the classes embedded in the tags as needed. The repeated blocks and tags can be held in string variables, rather than literals, too,to make reformatting the document easy.

                          Once the document is created and opened in a browser, the document data, columns, styles and all, are easily pasted pretty reliably into Word (or most word processing apps)or Excel (or most spreadsheet apps) or written/printed to a PDF, however you need it. Or Word will directly open an html doc pretty reliably.

                          If you need your program to then open and display the output, you can use RUN "[your browser/Word/whatever path-your document]". Of if you need various users to be able to see the output displayed, and you won't know what their default browser (or whatever) may be, Alyce's API book has a couple of routines that work slick for opening docs in their user-default applications.

                          --- In libertybasic@yahoogroups.com, Bellsouth Inc <rij4360@...> wrote:
                          >
                          > Thank u Stefan, very decent of you to point out short cuts.
                          > Kurt
                          >
                          > --- On Sat, 6/1/13, Stefan Pendl <pendl2megabit@...> wrote:
                          >
                          > From: Stefan Pendl <pendl2megabit@...>
                          > Subject: Re: [libertybasic] FILES
                          > To: libertybasic@yahoogroups.com
                          > Date: Saturday, June 1, 2013, 2:58 AM
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >  
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          > Am 01.06.2013 04:11, schrieb Bellsouth Inc:
                          >
                          > > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?
                          >
                          > > Kurt
                          >
                          > >
                          >
                          > > N = 99999
                          >
                          > > Print "Send this stuff to a disk file called MorseCode"
                          >
                          > >
                          >
                          > > Open "MorseCode.txt" for output as #1
                          >
                          > > For K= 1 to 30
                          >
                          > >
                          >
                          > > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5
                          >
                          > > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5
                          >
                          > >
                          >
                          > > Next K
                          >
                          > > Close #1
                          >
                          > > Print "End"
                          >
                          > >
                          >
                          >
                          >
                          > Why do you want to create a word document?
                          >
                          > Word documents are hard to create anyways.
                          >
                          >
                          >
                          > You can omit the repeated ":Print #1," sequence to get a shorter line of
                          >
                          > code.
                          >
                          >
                          >
                          > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";
                          >
                          > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5
                          >
                          >
                          >
                          > You can use the line continuation character too.
                          >
                          >
                          >
                          > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _
                          >
                          > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _
                          >
                          > Int(Rnd(1)*N)+5
                          >
                          >
                          >
                          > --
                          >
                          > Stefan Pendl
                          >
                          > http://stefanpendl.runbasichosting.com/
                          >
                          >
                          >
                          > LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                          >
                          > LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
                          >
                          >
                          >
                          > LB Community Wiki .............. http://basic.wikispaces.com/
                          >
                          > LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                          >
                          > LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
                          >
                          >
                          >
                          > Books at http://www.lulu.com/ and http://www.amazon.com/
                          >
                          > Alyce Watson ... APIs for Liberty BASIC
                          >
                          > Carl Gundel .... Beginning Programming with Liberty BASIC
                          >
                          >
                          >
                          > Windows 7 Home Premium 64-bit SP1
                          >
                          > AMD Turion X2 RM-70 2GHz, 4GB RAM
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          >
                          > [Non-text portions of this message have been removed]
                          >




                          [Non-text portions of this message have been removed]
                        • Stefan Pendl
                          ... The LB wikis have all the information. http://lbpe.wikispaces.com/GraphicPrinting shows how to use a graphics control to preview a printed page. There was
                          Message 12 of 16 , Jun 3, 2013
                          • 0 Attachment
                            Am 03.06.2013 15:28, schrieb Sarmed N.:
                            >
                            >
                            >> is to have the LB program write/format the output as an HTML doc.
                            >
                            > Dear LB Group,
                            >
                            > I still asking if anyone knows is this a real program Harry point to, which I never heard about.
                            > Or it's only an idea, my be I am not able to understand the meaning.
                            > Please explain.
                            >

                            The LB wikis have all the information.

                            http://lbpe.wikispaces.com/GraphicPrinting shows how to use a graphics
                            control to preview a printed page.

                            There was an article or post that created a HTML file and printed it,
                            but I can't remember the forum.


                            --
                            Stefan Pendl
                            http://stefanpendl.runbasichosting.com/

                            LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                            LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                            LB Community Wiki .............. http://basic.wikispaces.com/
                            LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                            LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                            Books at http://www.lulu.com/ and http://www.amazon.com/
                            Alyce Watson ... APIs for Liberty BASIC
                            Carl Gundel .... Beginning Programming with Liberty BASIC

                            Windows 7 Home Premium 64-bit SP1
                            AMD Turion X2 RM-70 2GHz, 4GB RAM
                          • Sarmed N.
                            Thank you Stefan, Thanks a lot, All the best to you. ________________________________ From: Stefan Pendl To:
                            Message 13 of 16 , Jun 3, 2013
                            • 0 Attachment
                              Thank you Stefan,
                              Thanks a lot,
                              All the best to you.






                              ________________________________
                              From: Stefan Pendl <pendl2megabit@...>
                              To: libertybasic@yahoogroups.com
                              Sent: Monday, June 3, 2013 7:36 PM
                              Subject: Re: [libertybasic] Re: FILES



                               
                              Am 03.06.2013 15:28, schrieb Sarmed N.:
                              >
                              >
                              >> is to have the LB program write/format the output as an HTML doc.
                              >
                              > Dear LB Group,
                              >
                              > I still asking if anyone knows is this a real program Harry point to, which I never heard about.
                              > Or it's only an idea, my be I am not able to understand the meaning.
                              > Please explain.
                              >

                              The LB wikis have all the information.

                              http://lbpe.wikispaces.com/GraphicPrinting shows how to use a graphics
                              control to preview a printed page.

                              There was an article or post that created a HTML file and printed it,
                              but I can't remember the forum.

                              --
                              Stefan Pendl
                              http://stefanpendl.runbasichosting.com/

                              LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                              LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                              LB Community Wiki .............. http://basic.wikispaces.com/
                              LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                              LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                              Books at http://www.lulu.com/ and http://www.amazon.com/
                              Alyce Watson ... APIs for Liberty BASIC
                              Carl Gundel .... Beginning Programming with Liberty BASIC

                              Windows 7 Home Premium 64-bit SP1
                              AMD Turion X2 RM-70 2GHz, 4GB RAM



                              [Non-text portions of this message have been removed]
                            • Harry
                              Sarmed, It s the output, or part of the output routines of several programs I ve written. I ll try to find the time this week to pull out or or write a
                              Message 14 of 16 , Jun 4, 2013
                              • 0 Attachment
                                Sarmed,

                                It's the output, or part of the output routines of several programs I've written. I'll try to find the time this week to pull out or or write a sample.

                                Harry

                                --- In libertybasic@yahoogroups.com, "Sarmed N." <sarmednafi@...> wrote:
                                >
                                > > the LB program write/format the output as an HTML doc.
                                >
                                >
                                > Dear Harry,
                                >
                                >
                                > Is this a real program? have any link to it?
                                >
                                > Or it's just a thought?
                                >
                                >
                                > Regards,
                                > Sarmed
                                >
                                >
                                >
                                > ________________________________
                                > From: Harry <harrybee99@...>
                                > To: libertybasic@yahoogroups.com
                                > Sent: Sunday, June 2, 2013 10:32 PM
                                > Subject: [libertybasic] Re: FILES
                                >
                                >
                                >
                                >  
                                > I've found the easiest way to create formatted documents with columns, font styles, para styles, embedded images and such from LB is to have the LB program write/format the output as an HTML doc. For your 5-columns application, a table with 5 columns will have the same tags in each table row, and justification and styles for each column can be embedded in the various column tags <TD ...>, or classes can be created in the header block and the classes embedded in the tags as needed. The repeated blocks and tags can be held in string variables, rather than literals, too,to make reformatting the document easy.
                                >
                                > Once the document is created and opened in a browser, the document data, columns, styles and all, are easily pasted pretty reliably into Word (or most word processing apps)or Excel (or most spreadsheet apps) or written/printed to a PDF, however you need it. Or Word will directly open an html doc pretty reliably.
                                >
                                > If you need your program to then open and display the output, you can use RUN "[your browser/Word/whatever path-your document]". Of if you need various users to be able to see the output displayed, and you won't know what their default browser (or whatever) may be, Alyce's API book has a couple of routines that work slick for opening docs in their user-default applications.
                                >
                                > --- In libertybasic@yahoogroups.com, Bellsouth Inc <rij4360@> wrote:
                                > >
                                > > Thank u Stefan, very decent of you to point out short cuts.
                                > > Kurt
                                > >
                                > > --- On Sat, 6/1/13, Stefan Pendl <pendl2megabit@> wrote:
                                > >
                                > > From: Stefan Pendl <pendl2megabit@>
                                > > Subject: Re: [libertybasic] FILES
                                > > To: libertybasic@yahoogroups.com
                                > > Date: Saturday, June 1, 2013, 2:58 AM
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >  
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > > Am 01.06.2013 04:11, schrieb Bellsouth Inc:
                                > >
                                > > > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?
                                > >
                                > > > Kurt
                                > >
                                > > >
                                > >
                                > > > N = 99999
                                > >
                                > > > Print "Send this stuff to a disk file called MorseCode"
                                > >
                                > > >
                                > >
                                > > > Open "MorseCode.txt" for output as #1
                                > >
                                > > > For K= 1 to 30
                                > >
                                > > >
                                > >
                                > > > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5
                                > >
                                > > > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5
                                > >
                                > > >
                                > >
                                > > > Next K
                                > >
                                > > > Close #1
                                > >
                                > > > Print "End"
                                > >
                                > > >
                                > >
                                > >
                                > >
                                > > Why do you want to create a word document?
                                > >
                                > > Word documents are hard to create anyways.
                                > >
                                > >
                                > >
                                > > You can omit the repeated ":Print #1," sequence to get a shorter line of
                                > >
                                > > code.
                                > >
                                > >
                                > >
                                > > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";
                                > >
                                > > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5
                                > >
                                > >
                                > >
                                > > You can use the line continuation character too.
                                > >
                                > >
                                > >
                                > > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _
                                > >
                                > > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _
                                > >
                                > > Int(Rnd(1)*N)+5
                                > >
                                > >
                                > >
                                > > --
                                > >
                                > > Stefan Pendl
                                > >
                                > > http://stefanpendl.runbasichosting.com/
                                > >
                                > >
                                > >
                                > > LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                                > >
                                > > LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
                                > >
                                > >
                                > >
                                > > LB Community Wiki .............. http://basic.wikispaces.com/
                                > >
                                > > LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                                > >
                                > > LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
                                > >
                                > >
                                > >
                                > > Books at http://www.lulu.com/ and http://www.amazon.com/
                                > >
                                > > Alyce Watson ... APIs for Liberty BASIC
                                > >
                                > > Carl Gundel .... Beginning Programming with Liberty BASIC
                                > >
                                > >
                                > >
                                > > Windows 7 Home Premium 64-bit SP1
                                > >
                                > > AMD Turion X2 RM-70 2GHz, 4GB RAM
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > > [Non-text portions of this message have been removed]
                                > >
                                >
                                >
                                >
                                >
                                > [Non-text portions of this message have been removed]
                                >
                              • Sarmed N.
                                Thank you Harry, I will appreciate that very much, Take your time.  Regards, Sarmed ________________________________ From: Harry To:
                                Message 15 of 16 , Jun 4, 2013
                                • 0 Attachment
                                  Thank you Harry,

                                  I will appreciate that very much,
                                  Take your time. 


                                  Regards,

                                  Sarmed




                                  ________________________________
                                  From: Harry <harrybee99@...>
                                  To: libertybasic@yahoogroups.com
                                  Sent: Tuesday, June 4, 2013 1:12 PM
                                  Subject: [libertybasic] Re: FILES



                                   
                                  Sarmed,

                                  It's the output, or part of the output routines of several programs I've written. I'll try to find the time this week to pull out or or write a sample.

                                  Harry

                                  --- In libertybasic@yahoogroups.com, "Sarmed N." <sarmednafi@...> wrote:
                                  >
                                  > > the LB program write/format the output as an HTML doc.
                                  >
                                  >
                                  > Dear Harry,
                                  >
                                  >
                                  > Is this a real program? have any link to it?
                                  >
                                  > Or it's just a thought?
                                  >
                                  >
                                  > Regards,
                                  > Sarmed
                                  >
                                  >
                                  >
                                  > ________________________________
                                  > From: Harry <harrybee99@...>
                                  > To: libertybasic@yahoogroups.com
                                  > Sent: Sunday, June 2, 2013 10:32 PM
                                  > Subject: [libertybasic] Re: FILES
                                  >
                                  >
                                  >
                                  >  
                                  > I've found the easiest way to create formatted documents with columns, font styles, para styles, embedded images and such from LB is to have the LB program write/format the output as an HTML doc. For your 5-columns application, a table with 5 columns will have the same tags in each table row, and justification and styles for each column can be embedded in the various column tags <TD ...>, or classes can be created in the header block and the classes embedded in the tags as needed. The repeated blocks and tags can be held in string variables, rather than literals, too,to make reformatting the document easy.
                                  >
                                  > Once the document is created and opened in a browser, the document data, columns, styles and all, are easily pasted pretty reliably into Word (or most word processing apps)or Excel (or most spreadsheet apps) or written/printed to a PDF, however you need it. Or Word will directly open an html doc pretty reliably.
                                  >
                                  > If you need your program to then open and display the output, you can use RUN "[your browser/Word/whatever path-your document]". Of if you need various users to be able to see the output displayed, and you won't know what their default browser (or whatever) may be, Alyce's API book has a couple of routines that work slick for opening docs in their user-default applications.
                                  >
                                  > --- In libertybasic@yahoogroups.com, Bellsouth Inc <rij4360@> wrote:
                                  > >
                                  > > Thank u Stefan, very decent of you to point out short cuts.
                                  > > Kurt
                                  > >
                                  > > --- On Sat, 6/1/13, Stefan Pendl <pendl2megabit@> wrote:
                                  > >
                                  > > From: Stefan Pendl <pendl2megabit@>
                                  > > Subject: Re: [libertybasic] FILES
                                  > > To: libertybasic@yahoogroups.com
                                  > > Date: Saturday, June 1, 2013, 2:58 AM
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >  
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > > Am 01.06.2013 04:11, schrieb Bellsouth Inc:
                                  > >
                                  > > > OK I did it! No laughing. THis will send 30 lines of Morse Code numbers to a file. Can I pic a font and send it to a Word text file?
                                  > >
                                  > > > Kurt
                                  > >
                                  > > >
                                  > >
                                  > > > N = 99999
                                  > >
                                  > > > Print "Send this stuff to a disk file called MorseCode"
                                  > >
                                  > > >
                                  > >
                                  > > > Open "MorseCode.txt" for output as #1
                                  > >
                                  > > > For K= 1 to 30
                                  > >
                                  > > >
                                  > >
                                  > > > Rem Print K;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+5;:Print" ";:Print Int(Rnd(1)*N)+1;:Print" ";:Print Int(Rnd(1)* N)+5
                                  > >
                                  > > > Print #1,K;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+5;:Print #1, " ";:Print #1, Int(Rnd(1)*N)+1;:Print #1, " ";:Print #1, Int(Rnd(1)* N)+5
                                  > >
                                  > > >
                                  > >
                                  > > > Next K
                                  > >
                                  > > > Close #1
                                  > >
                                  > > > Print "End"
                                  > >
                                  > > >
                                  > >
                                  > >
                                  > >
                                  > > Why do you want to create a word document?
                                  > >
                                  > > Word documents are hard to create anyways.
                                  > >
                                  > >
                                  > >
                                  > > You can omit the repeated ":Print #1," sequence to get a shorter line of
                                  > >
                                  > > code.
                                  > >
                                  > >
                                  > >
                                  > > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " ";
                                  > >
                                  > > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; Int(Rnd(1)*N)+5
                                  > >
                                  > >
                                  > >
                                  > > You can use the line continuation character too.
                                  > >
                                  > >
                                  > >
                                  > > Print #1,K; " "; Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+5; " "; _
                                  > >
                                  > > Int(Rnd(1)*N)+5; " "; Int(Rnd(1)*N)+1; " "; _
                                  > >
                                  > > Int(Rnd(1)*N)+5
                                  > >
                                  > >
                                  > >
                                  > > --
                                  > >
                                  > > Stefan Pendl
                                  > >
                                  > > http://stefanpendl.runbasichosting.com/
                                  > >
                                  > >
                                  > >
                                  > > LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                                  > >
                                  > > LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
                                  > >
                                  > >
                                  > >
                                  > > LB Community Wiki .............. http://basic.wikispaces.com/
                                  > >
                                  > > LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                                  > >
                                  > > LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
                                  > >
                                  > >
                                  > >
                                  > > Books at http://www.lulu.com/ and http://www.amazon.com/
                                  > >
                                  > > Alyce Watson ... APIs for Liberty BASIC
                                  > >
                                  > > Carl Gundel .... Beginning Programming with Liberty BASIC
                                  > >
                                  > >
                                  > >
                                  > > Windows 7 Home Premium 64-bit SP1
                                  > >
                                  > > AMD Turion X2 RM-70 2GHz, 4GB RAM
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > >
                                  > > [Non-text portions of this message have been removed]
                                  > >
                                  >
                                  >
                                  >
                                  >
                                  > [Non-text portions of this message have been removed]
                                  >




                                  [Non-text portions of this message have been removed]
                                • LaurieM
                                  Hope this helps http://alycesrestaurant.com/lbbrowse.htm This demo will not function without lbbrowse.dll
                                  Message 16 of 16 , Jun 4, 2013
                                  • 0 Attachment
                                    Hope this helps

                                    http://alycesrestaurant.com/lbbrowse.htm

                                    'This demo will not function without lbbrowse.dll
                                    '******************************************************
                                    'LBBROWSE.DLL is copyright Alyce Watson, 2005.
                                    'LBBROWSE.DLL is freeware. You may use it in any application,
                                    'including commercial products. A credit to the author and a
                                    'link to the website must be included in your program's
                                    'documentation or readme file, and in any source code released
                                    'to the public.
                                    'Alyce Watson
                                    'http://alycesrestaurant.com/
                                    '******************************************************
                                    nomainwin
                                    dim info$(10,10)
                                    'make up some data to display in a table
                                    dim myData$(20,2)
                                    dataField$="One Two Three Four Five Six Seven Eight Nine Ten "+_
                                    "Eleven Twelve Thirteen Fourteen Fifteen * # @ $ Twenty"
                                    'put the data into arrays
                                    for n=1 to 20
                                    myData$(n,1)=right$("0"+str$(n),2)
                                    myData$(n,2)=word$(dataField$,n)
                                    next n
                                    sortColumn=2
                                    sort myData$(),1,20,sortColumn
                                    fileExists=checkExists("lbbrowse.dll")
                                    if fileExists = 0 then
                                    notice "Demo requires missing dll";chr$(13);"LBBROWSE.DLL can be downloaded from";chr$(13);_
                                    "http://alycesrestaurant.com/";chr$(13);_
                                    "The dll is generously provided as freeware";chr$(13);_
                                    "and is Copyright by Alyce Watson."
                                    end
                                    end if
                                    reportFileName$=DefaultDir$+"\report1.htm"
                                    'make your own logo jpeg image, alternative text is displayed if image
                                    'is not found
                                    logoImgFile$="logo.jpg"
                                    backGroundFile$="libertyBackground.jpg"
                                    columnTitle$(1)="Word #"
                                    columnTitle$(2)="Data"
                                    tableBorder=1
                                    UpperLeftX=1:UpperLeftY=1
                                    WindowWidth=700:WindowHeight=550
                                    menu #main, "&File","&Internet Options",[internetOptions],"&Print Preview",[printPreview],_
                                    "P&rint",[printHtmlReport],"&Exit",[quit]
                                    menu #main, "&Sort","Sort by &Word #",[sortColumn1],"Sort by &Data",[sortColumn2]
                                    stylebits #main.rptL, _ES_CENTER or _SS_CENTERIMAGE,0,_WS_EX_CLIENTEDGE,0
                                    statictext #main.rptL, "Report title >", 8, 10, 80, 25
                                    textbox #main.rpt, 90,10,200,25
                                    button #main.rb, "Show report", [showHtmlReport],ul 300,10,90,25
                                    button #main.pnt, "Print report", [printHtmlReport],ul 300,10,90,25
                                    checkbox #main.cbx, "Remove table border", [tableBorder],[tableBorder],400,10,140,25
                                    checkbox #main.cbx2, "Remove background", [tableBgnd],[tableBgnd],550,10,140,25
                                    stylebits #main, 0,_WS_VISIBLE,0,0
                                    open "HTML reports from LibertyBASIC" for window as #main
                                    #main, "trapclose quit"
                                    #main "resizehandler resizer"
                                    hMain=hwnd(#main)
                                    #main.pnt, "!hide"
                                    #main.cbx, "hide"
                                    #main.cbx2, "hide"
                                    #main, "font arial 9"
                                    'initial page for browser to display
                                    url$=DefaultDir$+"\blank.htm"
                                    'set up embedded browser utilising Alyce's lbbrowse dll
                                    open "lbbrowse.dll" for dll as #browse
                                    calldll #browse, "CreateBrowser", hMain as ulong, 40 as long, _
                                    55 as long, 600 as long, 400 as long,_
                                    url$ as ptr, 1 as long, result as ulong

                                    if result<>0 then
                                    notice "Unable to load browser control."
                                    end
                                    end if

                                    'hide browser statusbar
                                    calldll #browse, "ShowStatusbar", 0 as long, re as void
                                    'enter default report title in textbox
                                    #main.rpt, "'My Report'"
                                    #main, "show"
                                    wait

                                    sub resizer h$
                                    newW=WindowWidth-80:newH = WindowHeight-75
                                    calldll #browse, "MoveBrowser",40 as long, 55 as long, newW as long,_
                                    newH as long, r as void
                                    end sub

                                    [showHtmlReport]
                                    gosub [buildHtmlReport]
                                    wait

                                    [tableBgnd]
                                    tableBg=1-tableBg
                                    if tableBg=1 then
                                    backGroundFile$=""
                                    else
                                    backGroundFile$="libertyBackground.jpg"
                                    end if
                                    gosub [buildHtmlReport]
                                    wait

                                    [tableBorder]
                                    tableBorder=1-tableBorder
                                    gosub [buildHtmlReport]
                                    wait

                                    [sortColumn1]
                                    sortColumn=1
                                    sort myData$(),1,20,sortColumn
                                    gosub [buildHtmlReport]
                                    wait

                                    [sortColumn2]
                                    sortColumn=2
                                    sort myData$(),1,20,sortColumn
                                    gosub [buildHtmlReport]
                                    wait

                                    [buildHtmlReport]
                                    'show browser
                                    calldll #browse, "ShowBrowser", 1 as long, re as void
                                    'get report title from textbox
                                    #main.rpt, "!contents? reportTitle$"
                                    'open file to store report
                                    open reportFileName$ for output as #htm
                                    'generate html code for report page formatted as table, two columns per row
                                    'note fixed background graphic over which table scrolls.
                                    #htm, "<html><head><title>LibertyBASIC/HTML report generator</title></head>";_
                                    "<body background=";backGroundFile$;" bgproperties=fixed><HR size=6 color=gold>";_
                                    "<font size=5 color=red><I>";reportTitle$;"</I>";_
                                    "<img src=";logoImgFile$;" hspace=10 alt=logo_here>";date$();"</font> (Sorted by: ";_
                                    columnTitle$(sortColumn);")</font><BR><HR color=red><BR>"
                                    #htm, "<table border=";tableBorder;" width=100% cellspacing=0 bordercolor=gainsboro>"
                                    'enter column titles
                                    #htm, "<tr><td width=20% align=left><font size=4 color=green>";columnTitle$(1);"</font></td>"
                                    #htm, "<td width=50% align=left><font size=4 color=green>";columnTitle$(2);"</font></td>"
                                    #htm, "<td width=30% align=left><font size=4 color=green> </font></td></tr>"
                                    fontColor$="blue" 'font color for first ten items
                                    'enter data from arrays into rows of a table
                                    for row=1 to 20
                                    #htm, "<tr><td width=20%><font size=2 color=";fontColor$;">"+myData$(row,1);" </font></td>"
                                    #htm, "<td width=50%><font size=2 color=";fontColor$;">"+myData$(row,2);" </font></td>"
                                    #htm, "<td width=30%><font size=2 color=";fontColor$;"> </font></td></tr>"
                                    if row=10 then fontColor$="purple" 'font color for next ten items
                                    next row
                                    #htm, "</table><BR><BR>This HTML generated report is produced in an embedded browser "+_
                                    "using lbbrowse.dll, generously gifted to us by Alyce, to whom we are "+_
                                    "eternally indebted! This dll gives us a tool to display and print data "+_
                                    "and documents in tables, frames, full colour, including graphics etc.</body></html>"
                                    close #htm
                                    'display the report in the browser
                                    calldll #browse, "Navigate", reportFileName$ as ptr, ret as void
                                    #main.rb, "!hide"
                                    #main.pnt, "!show"
                                    #main.cbx, "show"
                                    #main.cbx2, "show"
                                    return

                                    [printPreview]
                                    calldll #browse, "PrintPreview", re as void
                                    wait

                                    [printHtmlReport]
                                    calldll #browse, "BrowserPrint", re as void
                                    wait

                                    [internetOptions]
                                    calldll #browse, "InternetOptions", re as void
                                    wait

                                    [quit]
                                    call quit "#main"

                                    sub quit hW$
                                    calldll #browse, "DestroyBrowser", re as void
                                    close #browse
                                    close #hW$
                                    end
                                    end sub

                                    function checkExists(f$)
                                    files "",f$, info$(
                                    checkExists = val(info$(0, 0))
                                    end function
                                  Your message has been successfully submitted and would be delivered to recipients shortly.