| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 22 online users. » 0 Member(s) | 21 Guest(s) Applebot
|
| Latest Threads |
ZScript
Forum: Discussion
Last Post: z-s
Yesterday, 03:31 AM
» Replies: 0
» Views: 24
|
I think that no more Smal...
Forum: Discussion
Last Post: eddylo
01-20-2026, 11:02 PM
» Replies: 0
» Views: 19
|
Small Basic Coder-A New G...
Forum: Discussion
Last Post: AbsoluteBeginner
01-17-2026, 07:57 PM
» Replies: 1
» Views: 416
|
ZS Small Basic Coder GPT.
Forum: Discussion
Last Post: z-s
01-13-2026, 03:32 AM
» Replies: 4
» Views: 132
|
3D maze in browser contro...
Forum: Discussion
Last Post: stevantosic
01-08-2026, 12:51 PM
» Replies: 128
» Views: 33,300
|
ZS Extension.
Forum: Extensions
Last Post: AbsoluteBeginner
01-04-2026, 02:50 PM
» Replies: 109
» Views: 28,276
|
Happy New Year!
Forum: Discussion
Last Post: AbsoluteBeginner
12-31-2025, 10:08 AM
» Replies: 0
» Views: 71
|
Six different 8-bit emula...
Forum: Discussion
Last Post: stevantosic
12-28-2025, 06:02 PM
» Replies: 2
» Views: 87
|
Challenge-Command Line GW
Forum: Challenges
Last Post: WhTurner
12-22-2025, 06:24 PM
» Replies: 7
» Views: 2,263
|
Google Search Terminal SB...
Forum: Standard Small Basic
Last Post: z-s
12-17-2025, 09:09 AM
» Replies: 1
» Views: 336
|
|
|
| Zahl ins deutsche Format umwandeln |
|
Posted by: martmen - 05-02-2025, 03:26 PM - Forum: Extensions
- Replies (3)
|
 |
Hallo zusammen,
Das Programm (mit der Erweiterung LitDev) WNWQ963.000 formatiert eine Zahl in das deutsche Format mit Tausendertrennzeichen und Rundung.
Hat jemand einen Vorschlag für eine Verbesserung der Optimierung?
Vielen Dank
Martin
|
|
|
| Hey |
|
Posted by: sm4llprogrammer2008 - 04-20-2025, 06:27 PM - Forum: Discussion
- No Replies
|
 |
I'm making a website for submitting and sharing SB programs quickly.
It'll be easier to share SB programs there.
Just telling. (if any of you want to use the website)
|
|
|
| Small Basic hash retriever |
|
Posted by: sm4llprogrammer2008 - 04-20-2025, 04:09 PM - Forum: Standard Small Basic
- No Replies
|
 |
This is for the safety guaranteed for the file integrity kingdom of Windows.
ID: QQNW492.000
Link: https://smallbasic.com/program/?QQNW492.000
Requires: LitDev 1.2.30.0 Beta or higher, Small Basic 1.2 (web download version, 1.3 is UWP and doesn't support libs)
Code: main()
Sub main
TextWindow.Hide()
path = LDDialogs.InputBox("Get a MD5 hash of a file. Use 'dialog' to open a file selection dialog instead.", "Hash Retriever")
If path = "dialog" Then
getFile = LDDialogs.OpenFile("All files (*.*)|*.*", "")
retrievedHash = LDEncryption.MD5HashFile(getFile)
showHash()
Else
retrievedHash = LDEncryption.MD5HashFile(path)
showHash()
EndIf
EndSub
Sub showHash
TextWindow.Hide()
TextWindow.Title = ""
TextWindow.Show()
TextWindow.WriteLine("MD5 Hash: "+retrievedHash)
TextWindow.Write("Retrieve another hash? (Y/N) ")
getYorN = TextWindow.Read()
If getYorN = "y" Then
main()
ElseIf getYorN = "n" Then
Program.End()
EndIf
EndSub
Feel free to expand or to bundle in your own SB apps!
|
|
|
| Oh my gosh!! |
|
Posted by: sm4llprogrammer2008 - 04-19-2025, 05:48 PM - Forum: Standard Small Basic
- Replies (1)
|
 |
I've made a media player w/ Small Basic!!
Requirements: LitDev 1.2.30.0 Beta and higher
ID: FMBV557.000
Link: https://smallbasic.com/program/?FMBV557.000
Code: Init()
Sub Init
GraphicsWindow.BackgroundColor = "#FF408080"
GraphicsWindow.Title = "Untitled Small Media Player Window"
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.FontName = "MS Gothic"
SlFlBtn = Controls.AddButton("Select File",20,140)
Controls.SetSize(SlFlBtn,101,25)
PlayBtn = Controls.AddButton("Play",20,170)
Controls.SetSize(PlayBtn,101,25)
GraphicsWindow.BrushColor = "#FF000040"
GraphicsWindow.PenColor = "#FF000040"
Overlay = Shapes.AddRectangle(530,290)
Shapes.Move(Overlay,220,100)
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.FontName = "Times New Roman"
GraphicsWindow.FontBold = "False"
NmWnTb = Controls.AddTextBox(20,100)
Controls.SetTextBoxText(NmWnTb,"")
Controls.SetSize(NmWnTb,100,25)
GraphicsWindow.FontName = "MS Gothic"
GraphicsWindow.FontBold = "True"
SubmitBtn = Controls.AddButton("Submit",140,100)
Controls.SetSize(SubmitBtn,51,25)
GraphicsWindow.FontName = "Ubuntu Mono"
GraphicsWindow.FontBold = "False"
LabelNmWn = Shapes.AddText("Name Window:")
Controls.SetSize(LabelNmWn,87,15)
Shapes.Move(LabelNmWn,20,80)
GraphicsWindow.BrushColor = "#FFFFFF80"
GraphicsWindow.FontName = "Segoe UI"
GraphicsWindow.FontBold = "True"
GraphicsWindow.FontSize = 24
Logo = Shapes.AddText("Basic Media Player")
Controls.SetSize(Logo,220,30)
Shapes.Move(Logo,0,0)
GraphicsWindow.FontBold = "False"
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.FontName = "MS Gothic"
GraphicsWindow.FontSize = 12
GraphicsWindow.FontBold = "True"
AboutBtn = Controls.AddButton("About",230,10)
Controls.SetSize(AboutBtn,51,25)
LicenseBtn = Controls.AddButton("Licensing",290,10)
Controls.SetSize(LicenseBtn,71,25)
MediaPlayer = LDControls.AddMediaPlayer(530,290)
Shapes.Move(MediaPlayer,220,100)
PauseBtn = Controls.AddButton("Pause",20,200)
Controls.SetSize(PauseBtn,101,24.5)
LDControls.MediaPlayerEnded = Pause
Controls.ButtonClicked = Onclick
EndSub
Sub Pause
LDControls.MediaPlayerPause(MediaPlayer)
EndSub
Sub Onclick
last = Controls.LastClickedButton
If last = SubmitBtn Then
windowname = Controls.GetTextBoxText(NmWnTb)
GraphicsWindow.Title = windowname
ElseIf last = LicenseBtn Then
GraphicsWindow.ShowMessage("GPLv3", "")
ElseIf last = AboutBtn Then
GraphicsWindow.ShowMessage("You have the right to modify and republish the altered software. Created by sm4llprogrammer2008", "")
ElseIf last = SlFlBtn Then
getfile = LDDialogs.OpenFile("1=png;2=jpg;3=mp3;4=wav;5=mp4","")
ElseIf last = PlayBtn Then
LDControls.MediaPlayerLoad(MediaPlayer, getfile)
LDControls.MediaPlayerPlay(MediaPlayer)
ElseIf last = PauseBtn Then
LDControls.MediaPlayerPause(MediaPlayer)
EndIf
EndSub
Feel free to expand, again!
|
|
|
| Small Basic CMD simulator |
|
Posted by: sm4llprogrammer2008 - 04-19-2025, 05:21 PM - Forum: Standard Small Basic
- No Replies
|
 |
Finally,
After publishing my Bash simulator, I've tried to expand it's very basic code.
ID: ZVVD6.000
Link: https://smallbasic.com/program/?ZVVD6.000
Code: TextWindow.Hide()
TextWindow.Title = "Windows Command Prompt"
year = Clock.Year
path = "C:\Windows\System32"
helpInfoTxt[1] = "== HELP =="
helpInfoTxt[2] = "dir <path> - Lists files from a path."
helpInfoTxt[3] = "echo <text> - Writes line to the prompt."
helpInfoTxt[4] = "cd <path> - Enters a path."
helpInfoTxt[5] = "help - Shows this text."
TextWindow.Show()
TextWindow.ForegroundColor = "White"
TextWindow.WriteLine("Copyright "+year+" sm4llprogrammer2008")
While ("True")
TextWindow.ForegroundColor = "White"
TextWindow.Write(path+">> ")
TextWindow.ForegroundColor = "Gray"
prompt = TextWindow.Read()
EventHandler()
EndWhile
Sub EventHandler 'We'll return events based on input (variable: prompt)
getting = LDText.Split(prompt, " ") 'Split text
If getting[1] = "dir" Then 'Event handler for dir
getpath = getting[2]
If Text.GetIndexOf(getpath, "C:\") = 1 Then
files = File.GetFiles(getpath) 'Get files
For i = 1 To Array.GetItemCount(files) 'List all files from the directory input by the user
TextWindow.WriteLine(files[i])
EndFor
Else 'If no path is typed or none
TextWindow.WriteLine("Invalid path. Use a valid directory starting with C:\")
EndIf
ElseIf getting[1] = "cd" Then 'Event handler for cd
getpath = getting[2]
If Text.GetIndexOf(getpath, "C:\") = 1 Then
path = getpath
Else
TextWindow.WriteLine("Invalid path. Use a valid directory starting with C:\")
EndIf
ElseIf getting[1] = "echo" Then
returning = Text.GetSubText(prompt, Text.GetIndexOf(prompt, "echo") + 5, Text.GetLength(prompt) - Text.GetIndexOf(prompt, "echo") - 4)
TextWindow.WriteLine(returning)
ElseIf getting[1] = "help" Then
For i = 1 To Array.GetItemCount(helpInfoTxt)
TextWindow.WriteLine(helpInfoTxt[i])
EndFor
Else
TextWindow.WriteLine("Unknown command. Type 'help' for info.")
EndIf
EndSub
Feel free to expand!
Edit: requires LitDev Beta library!
|
|
|
| Small Basic bash simulator |
|
Posted by: sm4llprogrammer2008 - 04-19-2025, 04:21 PM - Forum: Standard Small Basic
- No Replies
|
 |
I've made a bash simulator.
Doesn't have cmdlets, but you can try expanding it!
Link: https://smallbasic.com/program/?XSLJ618.000
ID (to use on SB 1.2 when importing from web): XSLJ618.000
Code: TextWindow.Hide()
TextWindow.Title = "Small Bash"
While ("True")
TextWindow.ForegroundColor = "Green"
TextWindow.Write("\users\")
TextWindow.ForegroundColor = "Blue"
TextWindow.Write("~$ ")
TextWindow.ForegroundColor = "DarkGray"
prompt = TextWindow.Read()
EndWhile
TextWindow.Show()
It isn't quite compatible with Small Basic Online though.
|
|
|
| Writing extensions - ? |
|
Posted by: Yumda - 04-19-2025, 08:00 AM - Forum: Extensions
- Replies (6)
|
 |
Hi there:
Is there an updated guide for writing SB extension? My son knows abit of C#, and when we follow the instruction guide on how to write extension for SB using visual c# 2010 the message keeps on popping up that the .net fram work we are targeting is 3.5 but the smallbasic .DLL reference is for .NET 4.5 . Is there any new tutorial available or what people is using to write the extension?
Regards
YUMDA
|
|
|
| LDProcess und Datenbankprogramm Adressen |
|
Posted by: martmen - 04-18-2025, 11:19 PM - Forum: Extensions
- Replies (1)
|
 |
Hallo Leute,
habt ihr die LitDev Erweiterung in SB implementiert könnt ihr folgendes machen:
Das Programm LHSZ447.000 (als Menu.sb speichern) und CDGT638.000 (als Adressen.sb speichern) in einem Unterordner z.B. .. /Database Programm und Daten.
Ändert in den Programmen die Path-Angaben. Startet die Programme einmal. Dann könnt Ihr das Programm Menu.exe starten.
Wählt im Menü den Eintrag Adresse aus und es wird Adressen gestartet. Zum Menu kommt Ihr wenn Ihr im Programm Adressen den Button End anklickt.
So ist es möglich, eine Kette von Programmen hin und her aufzurufen.
Das Programm Adressen arbeitet mit einer Tabelle der Datenbank. Um eine andere Tabelle in einem neuen Programm zu bearbeiten, sind nur wenige Zeilen anzupassen.
Viel Spass beim ausprobieren
Martini
|
|
|
|