How can I download all Microsoft SmallBasic programs?

최광훈 31 Reputation points
2022-12-24T07:34:22.217+00:00

How can I download all Microsoft SmallBasic programs?

One can download a particular program via, for example, http://smallbasic.com/program/?Tetris

But I'd like to download all programs listed in the site. If I try http://smallbasic.com/program/? or http://smallbasic.com/program

it doesn't work at all.

Can you please help me?

The reason that I want to download all the programs is that I want to analyze how SmallBasic programs are written in syntax.

I thought that there would be a repository for everyone to access and download but it doesn't seem to be so.

Thank you in advance

Kwanghoon

Small BASIC
Small BASIC
A programming language created by Microsoft that serves a stepping stone for beginners from block-based coding languages to more complex text-based languages.
277 questions
0 comments No comments
{count} votes

Accepted answer
  1. Scout 541 Reputation points
    2022-12-25T21:09:02.953+00:00

    There is no database or repository of Small Basic programs.
    However, there is still the archived SmallBasic forum:

    SmallBasicForum

    The following list shows all threads with the associated program IDs

    273808-idnos-20200426.txt

    Among them are some very good programs.

    Furthermore, there are various programs such as tutorials etc. on the Microsoft website.

    1 person found this answer helpful.
    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. 최광훈 31 Reputation points
    2023-01-10T06:32:38.697+00:00

    Thanks to a Java program written by Sooyeon Hwang, I can download all smallbasic source programs listed in idnos-20200426.txt.

    $ git clone <the above URL> $ cd SmallBasic_FileList $ cd src $ javac TextExtract.java $ java TextExtract HRT413 DSD647 MTJ275 TKK350 XGD977 RPB297-0 KRR126 LQT869 DSD647-2 DSD647-3 QFW939 DBV633 DBV633-0 MSL416 CXL614 SCL615 RXG926 FSJ613 GFZ423 BHC940-1 : error SCL615-0

    ...

    VDP129 DKJ096 CHD756 CAF9E0 : error FFA500 : error

    Total: 7213 Downloads: 6891 Errors: 322

    One can find a list of smallbasic programs from idnos-20200426.txt

    and some of the Smallbasic source programs

    (Limitation: Due to the limitation of free Github accounts, one folder in a git repository can contain only about 1000 files.)

    2 people found this answer helpful.

  2. WhTurner 1,611 Reputation points
    2023-01-13T17:52:47.7966667+00:00

    The following program splits the SBfiles.txt into the separate files. All files starting with e.g. C go to a subdirectory Cfiles (need to make the directory before starting the program)

    ''splitText  230113   WhT
    '' split SB_files_?.txt into subdirectory ?files
    ''  needs Litdev extension for  LDFile.Length()
    startletter="D"
    FI=Program.Directory+"/SB_files_"+startletter+".txt"
    FF=Program.Directory+"/"+startletter+"files/"
    Nlines=LDFile.Length(FI)
    TextWindow.WriteLine(Nlines)
    For ll=1 To Nlines
      line=File.ReadLine(FI,ll)
      If Text.StartsWith(line,"Start>") Then
        name=Text.GetSubText(line,7,Text.GetLength(line)-7)
        TextWindow.WriteLine(ll+":  "+name)
        FO=FF+name
        infile=1
        File.AppendContents(FO,"''  "+line)
        line=""
      EndIf
      If Text.StartsWith(line,"End>") Then
        infile=2
        ''TextWindow.Pause()
      EndIf
      If infile=1 Then
        File.AppendContents(FO,line)
      EndIf
    EndFor
    
    
    2 people found this answer helpful.
    0 comments No comments

  3. Scout 136 Reputation points
    2023-01-02T11:56:06.203+00:00

    The lines of the thread/program list have the following structure:

    Forum user | date | part of thread link | program IDs of the thread's Small Basic Programs

    Tryhest, [200404] , 5e752003-2e35-4abc-a393-2363ba75c497/challenge-of-the-month-april-2020,HRT413,DSD647,MTJ275,TKK350,XGD977,RPB297-0,KRR126,LQT869,DSD647-2,DSD647-3,QFW939,

    The full thread link looks like this
    https://social.msdn.microsoft.com/Forums/azure/en-US/5e752003-2e35-4abc-a393-2363ba75c497/challenge-of-the-month-april-2020?forum=smallbasic

    challenge-of-the-month-april-2020

    The following program creates the thread list. Clicking on the list entry takes you directly to the thread.
    Before starting, please download the file 275338-forumpage.txt into the program directory and rename it to forumpage.txt

    '  This program can list up program IDNo in the Small Basic Forum threads.     by NaochanON   2016/05/06 FXG725-0 '  
    '  This uses forumthreads name list  (below  Forumpath ) and add IDNos list and save it  named as   " IDNos.txt " '  
    '  It takes about 30min  (my PC) to get all ID numbers in all threads. '  
    '  This needs Litdev Extension '  
      
    Controls.ButtonClicked=Onclicked  
    init()  
    show_list()  
    LDControls.ListBoxItemChanged = OnListBoxItemChanged  
      
    Sub OnListBoxItemChanged  
      _thread=list[LDControls.LastListBoxIndex]  
      _thread=text.GetSubTextToEnd(_thread,Text.GetIndexOf(_thread,",")+2)  
      crP= Text.GetIndexOf(_thread,",")   
      _thread=text.GetSubTextToEnd(_thread,Text.GetIndexOf(_thread,",")+2)  
      crP= Text.GetIndexOf(_thread,",")   
      threadname= Text.GetSubText(_thread,1,crP-1)  
      LDProcess.Start(head+threadname+tail,"")   
    EndSub   
      
    Sub Onclicked  
      nm= Controls.GetButtonCaption(Controls.LastClickedButton)  
      If nm= "IDGet"  Then   
    ' The following line could be harmful and has been automatically commented. '  
        File.DeleteFile(IDListpath)  
        Get_IDNo()   
      ElseIf nm="Search" then   
        Search_Threads()  
      elseif text.IsSubText(nm,"Show") then   
        show_list()  
      EndIf  
    EndSub  
      
    Sub show_list  
    ' The following line could be harmful and has been automatically commented. '  
       If LDFile.Exists(IDListpath) Then   
    ' The following line could be harmful and has been automatically commented. '  
         List= LDFile.ReadToArray(IDListpath)  
        box[2]=LDControls.AddListBox(List,1170,650)  
        Shapes.Move(box[2],10,35)  
      Else  
        Shapes.SetText(msg,"File not exists.   Push IDGet button  ")  
      EndIf  
    EndSub  
      
    Sub Search_Threads  
      SelectedList=""  
      MM=0  
    ' The following line could be harmful and has been automatically commented. '  
       RD= File.ReadContents(IDListpath)  
      word= text.ConvertToLowerCase(Controls.GetTextBoxText(box[1]))  
      crP= Text.GetIndexOf(RD,CRLF)  
      While crP>0  
        _thread= Text.GetSubText(RD,1,crp-1)  
        If Text.IsSubText(text.ConvertToLowerCase(_thread),word) Then   
          MM=MM+1  
          Selectedlist[MM]=_thread  
        EndIf  
        RD= Text.GetSubTextToEnd(RD,crP+2)  
        crP= Text.GetIndexOf(RD,CRLF)  
      EndWhile  
      box[2]=LDControls.AddListBox(SelectedList,1170,650)  
      Shapes.Move(box[2],10,35)   
      List=selectedlist  
    EndSub  
      
    Sub Get_IDNo  
      For J=1 to MaxNMB  
    ' The following line could be harmful and has been automatically commented.'  
         _thread= File.ReadLine(Forumpath,J)   '     Pappa Lapub, [150430] , fef3c43....  ion-updates '  
        crP= Text.GetIndexOf(_thread,",")  
        Creator= Text.GetSubText(_thread,1,crP-1)  
        _thread=Text.GetSubTextToEnd(_thread,crP+1)  
        threadname=text.GetSubTextToEnd(_thread,Text.GetIndexOf(_thread,",")+2)  
        RD= Network.GetWebPageContents( head+threadname+tail)  
        Get_IDNos_IntheThread()  
        _thread=Creator+","+_thread+","+sumNMB  
        shapes.SetText(msg,j+"  /"+MaxNMB)                     
    ' The following line could be harmful and has been automatically commented.'  
         File.WriteLine(IDListpath,J,_thread)  
      endfor  
    EndSub  
      
    Sub Get_IDNos_IntheThread  
      sumNMB=""                           '   sumNMB is IDNo List'  
      mesP= Text.GetIndexOf(RD,DQ+"messageContent"+DQ)  
      While mesP>0  
        RD=Text.GetSubTextToEnd(RD,mesp)  
        stP= Text.GetIndexOf(RD,DQ+"body"+DQ)+8  
        endP= Text.GetIndexOf(RD,"</div>")  
        _mes= Text.GetSubText(RD,stp,endP-stp)  
        Len= Text.GetLength(_mes)  
        For i=1 To Len  
          id1=Text.GetSubText(_mes,i,1)  
          If text.IsSubText(alfa,id1) Then    '  N '  
            id2=Text.GetSubText(_mes,i+1,1)  
            If text.IsSubText(alfa,id2) Then  'NM '  
              id3=Text.GetSubText(_mes,i+2,1)  
              id4=Text.GetSubText(_mes,i+3,3)  
              If   text.IsSubText(alfa,id3) and 0<id4 and id4<1000 and text.IsSubText(id4," ")="False" and text.IsSubText(id4,".")="False" then 'NMB567'  
                NMB= Text.GetSubText(_mes,i,6)  
                If Text.GetSubText(_mes,i+6,1)="-" then  
                  NMB= Text.GetSubText(_mes,i,9)   '  EX:  NMB567-1) </p>'  
                  If  text.IsSubText(NM,Text.GetSubText(NMB,9,1))="False"  then   
                    NMB= Text.GetSubText(_mes,i,8)     ' NMB567 - 1 '  
                  EndIf  
                EndIf  
                If text.IsSubText(NMB,"ABC123")="False" and Text.IsSubText(sumnmb,NMB+",")="False" then '  omit same IDNO '  
                  sumnmb=sumnmb+NMB+","  
                EndIf  
                i=i+text.GetLength(NMB)   
              EndIf  
            EndIf  
          EndIf  
        EndFor  
        RD= Text.GetSubTextToEnd(RD,endp+2)  
        mesP= Text.GetIndexOf(RD,DQ+"messageContent"+DQ)  
      endwhile  
    EndSub  
      
    Sub init  
      GraphicsWindow.Width=1200  
      GraphicsWindow.Height=700  
      GraphicsWindow.BackgroundColor="#C7DC68"  
      GraphicsWindow.BrushColor="Navy"  
      GraphicsWindow.DrawText(15,15,"Get all IDNos in the thread")  
      Controls.AddButton("IDGet",200,10)  
      Controls.AddButton("Show original",260,10)  
      GraphicsWindow.DrawText(430,15,"Search word")  
      box[1]=Controls.AddTextBox(520,10)  
      Controls.SetSize(box[1],160,25)  
      Controls.AddButton("Search",700,10)  
      '------------------------------------------------------------------------- '  
      GraphicsWindow.BrushColor="Red"  
      GraphicsWindow.FontSize=22  
      msg= Shapes.AddText(" Wait !!!! ")  
      Shapes.Move(msg,200,200)  
      GraphicsWindow.BrushColor="Navy"  
      GraphicsWindow.FontSize=12  
      '------------------------------------------------------------------------- '  
      CRLF= Text.GetCharacter(13)+Text.GetCharacter(10)  
      head="https://social.msdn.microsoft.com/Forums/en-US/"  
      Hlen= Text.GetLength(head)  
      tail="?forum=smallbasic"  
      '------------------------------------------------------------------------- '  
      Forumpath= Program.Directory+"\forumpage.txt"  
      IDListpath= Program.Directory+"\IDNos.txt"  
       DQ= Text.GetCharacter(34)  
      alfa="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  
      NM="0123456789"  
      ' The following line could be harmful and has been automatically commented.'  
       'MaxNMB= 5078 '  '<---   Maxnmb is 5078  on 2020/04/25'  
       MaxNMB=LDFile.Length(Forumpath)   '<---  need Litdev extension   or  Maxnmb is 4056??  on 2015/05/06 '  
    EndSub  
    

    The program also has a search function for thread titles, users and time ranges. The search results are presented in a list.

    275482-titel-autor-datum.jpg

    1 person found this answer helpful.
    0 comments No comments

  4. Kristian Virtanen 126 Reputation points
    2023-01-13T17:19:46.4966667+00:00

    I am actually creating a library or a wrapper library that should be able to run 95% of SmallBasic codes.

    I never cant reach 100% but i think 95% is close enough mention it here.

    I have a wiki where i document stuff about this project. If someone has time and interest, providing those codes to that wiki would be cool and nice extra to have.

    1 person found this answer helpful.
    0 comments No comments