Questions tagged [smallbasic]

Small Basic is a Microsoft product for teaching beginners to program.

Small Basic is a Microsoft product for teaching beginners to program.

78 questions
0
votes
0 answers

How to dynamically update and run a .bas file with Python?

I have a python script that generates a .bas file which executes a process on SAP GUI. I pretend to run this script everyday to update the .bas file and run it. I discarded the idea of using a driver (like selenium) to manipulate the SAP GUI…
Edumacsou
  • 15
  • 4
0
votes
1 answer

How do I calculate the exact number of days old in Small Basic

So, for my school assignment, I have to build an ageing program that needs to calculate the number of days old (age in days). It needs to be in the text window, not the graphic window. I have this: Dayslived = (bob * 12 + (clock.month - month + 12))…
0
votes
0 answers

Small Basic & syntax highlighting in Visual Studio Code

I'm playing around with Small Basic. I love the built-in IDE, but I'd also like to use Visual Studio Code with it from time-to-time. However, I don't see a extension in the Marketplace that provides any sort of syntax highlighting, auto-completion,…
EJ Mak
  • 799
  • 1
  • 8
  • 29
0
votes
2 answers

Is it possible to open Textwindow and Graphicwindow at once?

I'm Korean Highschool student. I made a game about the rules of Korean spelling. The program that I want is.. [ If you choose the correct answer, the graphic window will show the next question and the text window will say " Great job. " ] Is it…
0
votes
2 answers

How can i make a variable choose between two other variables?

So i am making a small homework assignment that should draw a cloud (its kinda wierd but doesn't matter. And i need a variable to choose between 2 other variables like this: A = 1 B = 2 C = A or B I thought about using an array but is do not…
0
votes
2 answers

Small Basic Variables in Arrays?

In my hangman program, I'm trying to use an array to detect if a letter has been pressed before, and therefore cannot be pressed again. In my attempt to do this, I have tried using: If targetarray[LastLetter] = 1 Then Where 'LastLetter' is my…
Tezak
  • 36
  • 3
0
votes
2 answers

Every random number just once in an array

I recently started programming with SmallBasic and I was wondering if it was possible to check if a random number is already in an array. My code so far: Count = 10 For i = 1 to Count var[i] = Math.GetRandomNumer(100) TextWindow.Write(var[i] +…
0
votes
2 answers

How to turn a csv(or similar) to bmp(or similar)

I am currently doing a project in Microsoft Small Basic to have some fun, though I have got stuck. I have an array that I can export to a file in any format, which uses bytes as its smallest thing, such as a csv. Each pixel is a hex value, FFFFFF…
0
votes
1 answer

Multiple shape detection Smallbasic

I would like to make a controllable character for a game, however I do not wish the floor to be one shape. It will be made up of multiple shapes and have different y and x positions. Each shape is called rectangle[x][y] x and y ranging from 1 to 40…
0
votes
1 answer

How to count all the permutations of a string in Microsoft Small Basic?

How to count all the permutations of a string in Microsoft Small Basic? The brute-force exploring of all permutations is usually done by recursion in languages such as C and C++. However, Microsoft Small Basic doesn't support the arguments for…
FlatAssembler
  • 667
  • 7
  • 30
0
votes
1 answer

SmallBasic: How do I convert the hexadecimal value of the getpixel function to an rgb value?

Example Code: GraphicsWindow.MouseDown = md Sub md color = GraphicsWindow.GetPixel(GraphicsWindow.MouseX,GraphicsWindow.MouseY) EndSub This returns a hexadecimal value, but I need to convert this to an rgb value. How do I do so?
Auxhi
  • 5
  • 2
0
votes
1 answer

MS Small Basic: number table input from excel sheet

I am planning a MS Small Basic program where I am bring a fair amount of numbers as input. How can I read the number table from Excel sheet to the program? Antti
Antti
  • 11
0
votes
1 answer

Small Basic if-statement

So for school I'm making a project with small basic, idea is very simple, just like my question. I'm making a sort of gambling simulator. ready: TextWindow.WriteLine("Do you want to bet? yes(1) or no(2).") answer = TextWindow.ReadNumber() If answer…
0
votes
1 answer

how do I display a row of images that are of different sizes without overlapping?

I want a small basic program that can display multiple images in a row without overlapping. But since not all image files are the same, it's hard to do so. dir = Program.Directory imagedir = dir + "\images\" GraphicsWindow.BrushColor = "White" For i…
Auxhi
  • 5
  • 2
0
votes
2 answers

How do I make shapes move independently without jitter?

Here's the full code: GraphicsWindow.Clear() GraphicsWindow.CanResize = "false" GraphicsWindow.Height = Desktop.Height-200 GraphicsWindow.Width = Desktop.Width-200 scount = Math.GetRandomNumber(25) For s = 1 To scount Shx[s] =…
Auxhi
  • 5
  • 2