Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 42 online users. » 0 Member(s) | 40 Guest(s) Bing, Google
|
Latest Threads |
Request for command exten...
Forum: Extensions
Last Post: martmen
05-27-2025, 09:42 AM
» Replies: 2
» Views: 73
|
Multi Language GUI
Forum: Extensions
Last Post: kellanphil
05-27-2025, 02:00 AM
» Replies: 3
» Views: 188
|
Solution for large window...
Forum: Extensions
Last Post: martmen
05-25-2025, 10:17 AM
» Replies: 0
» Views: 74
|
ZS DIALOG ERROR
Forum: Extensions
Last Post: litdev
05-21-2025, 08:37 AM
» Replies: 4
» Views: 144
|
The OpenSB Project - reus...
Forum: Discussion
Last Post: z-s
05-19-2025, 12:56 AM
» Replies: 8
» Views: 185
|
Guys!
Forum: Discussion
Last Post: z-s
05-17-2025, 01:25 AM
» Replies: 1
» Views: 70
|
Creation of SB-Neuron. Ou...
Forum: Discussion
Last Post: AbsoluteBeginner
05-15-2025, 03:46 PM
» Replies: 102
» Views: 10,015
|
Few questions
Forum: Standard Small Basic
Last Post: litdev
05-14-2025, 09:36 AM
» Replies: 1
» Views: 83
|
Show ZPHB733.000 LDContro...
Forum: Extensions
Last Post: sm4llprogrammer2008
05-13-2025, 10:15 PM
» Replies: 5
» Views: 231
|
Another question.
Forum: Standard Small Basic
Last Post: litdev
05-13-2025, 07:04 AM
» Replies: 1
» Views: 66
|
|
|
some help - part one |
Posted by: Yumda - 03-21-2025, 07:49 AM - Forum: Standard Small Basic
- Replies (7)
|
 |
Hi there:
Not sure what I am doing wrong, I tried to write a simple cipher program for kids to play. The prime IDE compiled without any problem, but once create the new map and input the text to encrypt, the program terminated without showing the result in text window... I have created the unique word group it is saved into my P drive. I will have to post this in multiple parts as it has exceeded the maximum number of characters allowed
Any help would be great.
here are the code:
Code: ' Unified Encryption and Decryption Program for Small Basic
TextWindow.Write("Encrypt (E) or Decrypt (D)? ")
mode = Text.ConvertToLowerCase(TextWindow.Read())
If mode = "e" Then
Goto encryptMode
ElseIf mode = "d" Then
Goto decryptMode
Else
TextWindow.WriteLine("Invalid mode. Use E or D.")
Program.End()
EndIf
encryptMode:
CRLF = Text.GetCharacter(13) + Text.GetCharacter(10)
spaceReplacement = "空"
usedCombinations = ""
For i = 1 To 26
alphabet[i] = Text.GetCharacterCode(Text.GetSubText("ABCDEFGHIJKLMNOPQRSTUVWXYZ", i, 1))
EndFor
For i = 27 To 52
alphabet[i] = Text.GetCharacterCode(Text.GetSubText("abcdefghijklmnopqrstuvwxyz", i - 26, 1))
EndFor
TextWindow.WriteLine("Select cipher session:")
TextWindow.WriteLine("0: Generate new cipher map")
' Example hardcoded list
sessionList[1] = "p:\cipherwheel\session_maps\letter_map_2025-03-15_10-22-35.map"
sessionList[2] = "p:\cipherwheel\session_maps\letter_map_2025-03-16_11-30-00.map"
sessionList[3] = "p:\cipherwheel\session_maps\letter_map_2025-03-17_14-42-55.map"
sessionList[4] = "p:\cipherwheel\session_maps\letter_map_2025-03-18_16-12-45.map"
sessionList[5] = "p:\cipherwheel\session_maps\letter_map_2025-03-19_18-03-30.map"
sessionList[6] = "p:\cipherwheel\session_maps\letter_map_2025-03-20_09-44-10.map"
For i = 1 To 6
If sessionList[i] <> "" Then
TextWindow.WriteLine(i + ": " + sessionList[i])
EndIf
EndFor
TextWindow.Write("Choicp: ")
choice = TextWindow.ReadNumber()
If choice = 0 Then
now = Clock.Date + " " + Clock.Time
newTime = ""
For i = 1 To Text.GetLength(now)
ch = Text.GetSubText(now, i, 1)
If ch = "/" Or ch = ":" Then
newTime = newTime + "-"
ElseIf ch = " " Then
newTime = newTime + "_"
Else
newTime = newTime + ch
EndIf
EndFor
now = newTime
sessionMapPath = "p:\cipherwheel\session_maps\letter_map_" + now + ".map"
File.WriteContents("p:\cipherwheel\last_session.txt", sessionMapPath)
File.DeleteFile("p:\cipherwheel\letter.map")
|
|
|
Challenge 12 - Rotating triangle |
Posted by: litdev - 02-17-2025, 09:23 AM - Forum: Challenges
- Replies (9)
|
 |
Create a triangle shape in the center of a GraphicsWindow and rotate it left and right with arrow keys.
This is trickier than you may think NOT using an extension and will need some experimentation to work out the rules for it.
When you get this you could extend to using the line shape to make clock hands.
|
|
|
Chart Doesn't show true values |
Posted by: jrmrhrb00 - 02-15-2025, 11:10 PM - Forum: Extensions
- Replies (6)
|
 |
In the chart function it does not show the true value. It will show a percentage and it graphs the true value, but will not show it. In the snippet if ran you will see what I mean.
Code: Data["2000"]=1
Data["2001"]=2
Data["2002"]=3
Name=LDChart.AddChart(500,400)
LDChart.Legend(Name,1,"Legend_percent","True")
LDChart.Properties(Name,"Column",1)
LDChart.SetData(Name, Data)
It charts the data values 1,2,3 but will not show them. It does show the percentages up to 100%. Would it be possible in SetData to make values as a choice to show? Then it would show the value rather than a percentage?
JR
|
|
|
LDdictionary not working |
Posted by: jrmrhrb00 - 02-10-2025, 11:36 PM - Forum: Discussion
- Replies (32)
|
 |
LitDev,
Did you know that the LDDictionary function isn't working? I found that the regular one in small basic doesn't work any longer and then I tried yours and it doesn't work either.
JR
|
|
|
DeepSeek.c0m |
Posted by: jrmrhrb00 - 01-28-2025, 04:03 PM - Forum: Discussion
- Replies (1)
|
 |
Since the company "DeepSeek" is in the news I thought I would try it out. So, I went to "DeepSeek.com".
I did find that the website offers free access "V3" to its AI model. Also, I did find that it can do a really good job of coding with "Small Basic" and it can utilize the "LitDev" extension. I was impressed with DeepSeek's coding ability which it is known for.
You might want to give it a try.
JR
|
|
|
GraphicsWindow.LastKey |
Posted by: jrmrhrb00 - 01-15-2025, 01:37 PM - Forum: Standard Small Basic
- Replies (16)
|
 |
This is a little confusing, but here goes!
I have a program that I want to rerun for a second or more times. So, I clear the GraphicsWindow, and tell it to rerun by using a button. The problem I am having is: in the first run I use this:
While key <> "Return"
key = GraphicsWindow.Lastkey
EndWhile
This is to hold the program until I hit the return key. That works just fine. Then steps in "GraphicsWindow.LastKey" That function is read only. The problem is there is no way to reset it in standard "Small Basic" and it remembers the key was used in the first round of the program. So, on the second round the program zips right through the while loop. To work properly GraphicsWindow.LastKey needs to reset for the second or more rounds of the program. I looked in the LitDev Extension. Didn't see any way to reset it.
Any suggestions of how to do it?
Maybe, LitDev could add it to the extension?
JR
|
|
|
Threading |
Posted by: jrmrhrb00 - 01-09-2025, 03:27 PM - Forum: Extensions
- Replies (10)
|
 |
I think that it is interesting that with the wonderful LitDev Extension that there isn't at least one function for threading. Maybe, I missed it if there is, but I looked and I haven't found anything. LitDev did write an excellent article about threading and how to avoid its pitfalls. I suggest a new function for the LitDev extension called (LDThreading). What it would consist of I'm not sure, but I am sure the best person to create it would be LitDev.
JR
|
|
|
LDDialogs.SetStartupPosition |
Posted by: Yumda - 01-06-2025, 02:33 AM - Forum: Extensions
- Replies (4)
|
 |
Hi there:
does lddialogs.setstartupposition work for lddialogs.inputbox?
I tried to set it like this LDDialogs.SetStartupPosition(373,210,1) and then called lddialogs.inputbox,
eg
LDDialogs.SetStartupPosition(373,210,1)
dialog1 = lddialogs.inputbox("","")
but the input box position is not set in relation to the graphicwindows... any ideas?
or does the setposition option not apply to the input box?
Regards
|
|
|
|