Quantcast
Channel: Small Basic
Viewing all 669 articles
Browse latest View live

Small Basic - Traffic Light Challenge

$
0
0

One of this month's forum challenges was to create a traffic light system.

Graphics Challenge 2

Draw a traffic light that changes through the correct lighting sequence, perhaps using the Timer object.

We have 2 great answers in, the first by Martin from Germany.

And the second by NaochanOn from Japan which uses different coloured lights.

You can view them in action (as well as see the source code) using SIlverLight with the following links:

http://smallbasic.com/smallbasic.com/program/?MNZ607

http://smallbasic.com/smallbasic.com/program/?KZP715

Note that you can host any of your Small Basic programs online in this way after it is published and you have the 6 character ID.


How do you get a sound for your program?

$
0
0

When you create programs such like games, how do you get sounds for them?

One way is to use preset sounds in Small Basic.  There are four preset sounds as follows.

  1. Bell Ring
  2. Chime
  3. Chimes
  4. Click

Another way is to find free (or public domain) audio files.  You can use Sound.Play() or Sound.PlayAndWait() with audio files.  Mp3, wav, and wma format audio files are supported. Other format depends on audio codecs installed user's computer. 

The other way is to create your own audio files. Following instructions show a sample to create m4a format audio file with Sound Player in Windows 8.1.

  1. Connect a microphone or a instrument to your PC.
     
  2. Start > Apps by category > Tools > Sound Recorder
  3. Click the mic button.
  4. Make a sound.
  5. Click the stop button.
  6. Play the sound.
     
  7. If you need to trim the sound, click Trim button and drag start and end circles then click OK.
  8. And you can find the audio file in following folder. Xxx means your account name.
    C:\Users\xxx\AppData\Local\Packages\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe\LocalState\Indexed\Recordings 

I made some audio files with CASIO MT-240 keyboard (in the picture above) and uploaded to TechNet Gallery.  And sample code to use these audio files is VTQ526.

See also for your information.

Small Basic 1.0 Known Issues - Do we have them all?

$
0
0

Hi! We're looking through the Small Basic 1.0 Known Issues:

Known Issues about Microsoft Small Basic v1.0

 

Please let us know if we missed any (you can add them directly, comment here, or comment on the Wiki page).

And also, please help us add in more descriptions so that we can know clearly how to repro the issues.

 

This includes Documentation Issues as well!

 

 

 

Thanks! And special thanks to Nonki for writing this article and leading us to get it filled out!

 - Ninja Ed

Small Basic - GetSettingsFilePath

$
0
0

There are only 16 keywords and 20 objects in Small Basic, and I've been playing Small Basic for a few years now and thought I was pretty familiar with them.

I discovered one I have never used before following a post by Pappa Lapub in this forum thread Need help figuring out a way of showing score in my game.

The command is File.GetSettingsFilePath() and is a useful way to get a file path for a settings file. 

A settings file can be used to store data from one run of your program to the next.  Here is Pappa Lapub's example:

settingsFile = File.GetSettingsFilePath()
scoreInit = 12345
 
tb = Controls.AddTextBox(10,10)
Controls.SetTextBoxText(tb, scoreInit)
 
save = Controls.AddButton("Save Score", 200,10)
load = Controls.AddButton("Load Score", 200,40)
 
Controls.ButtonClicked = OnButtonClick
 
Sub OnButtonClick
  lastButton = Controls.LastClickedButton
  
  If (lastButton = save And Controls.GetTextBoxText(tb) <> "") Then
    score = Controls.GetTextBoxText(tb)
    File.WriteLine(settingsFile,1, score)     ' Save score to file
    Controls.SetTextBoxText(tb, "")
  ElseIf (lastButton = load) Then
    score = File.ReadLine(settingsFile, 1)   ' Load score from file
    Controls.SetTextBoxText(tb, score)
  EndIf
  
EndSub

The settings file name is based on the file name that you save your program with - so you have to save the example above somewhere first to use it with a settings file.

If you save your file as for example C:\Users\Public\Documents\SmallBasic\steve\SettingsFileExample.sb, then the settings file will be C:\Users\Public\Documents\SmallBasic\steve\SettingsFileExample.settings.

The 16 keywords are And, Else, ElseIf, EndFor, EndIf, EndSub, EndWhile, For, GoTo, If, Or, Step, Sub, Then, To and While.

The 20 objects are Array, Clock, Controls, Desktop, Dictionary, File, Flickr, GraphicsWindow, ImageList, Math, Mouse, Network, Program, Shapes, Sound, Stack, Text, TextWindow, Timer and Turtle.

Flags in Small Basic

$
0
0

A word flag has a meaning of a variable which contains a logical value. But today, I'd like to introduce flag graphics drawn with Small Basic.

I found three threads in Small Basic forum about following 15 flags.  Creating programs to draw flags may be good practices for graphics. How about adding your flags into a thread?  You can see many flags here.

The first thread is project: state banner written by martmen in June 2010.
SCL615 Germany by martmen
RXG926 Brazil by Kroltan
FSJ613 India by Vijaye Raji
GFZ423 North Korea by martmen
BHC940-1 USA by Rushworks
SCL615-0 Norway by Danair
GWG872 A 13-star variant of USA by Math Man
HNC322 Sun of Kazakhstan by Math Man [*]
SZR216 Russia by nickAmsterdam
RHH485 Scotland by litdev
NHZ085-0 Japan by Nonki Takahashi

The second one is in Challenge of the Month - July 2012.
HZZ916-0 USA by NaochanON
RNW591 Japan by Nonki Takahashi
HGS098 Mongolia by Nonki Takahashi

The last one is in Challenge of the Month - November 2013
FCF037 Olympic by Nonki Takahashi

[*] A flag of Kazakhstan above is not completed. Now I'm trying to complete this flag. If I completed, I'm going to post it to here.

Small Basic Featured Program - Gravity Simulator

$
0
0

This is a Gravity Simulation by Zock77, the import code is FHS907.

It includes self interaction between orbiting satellites - they attract each other.

The gravitational force attracting objects is given by Newton.  If the object masses are M and m and their separation is r, then the force of attraction is:

F = GMm/r2

G is the gravitational constant and r2 is r squared.

The force is on a line between the two objects and acts as an acceleration on both objects towards each other.  The acceleration of each object (A and a) is proportional to the force and inversely proportional to its mass, F = M.A and F=m.a.

The sun's mass is 50 times that of the satellites and is set to remain stationary, and it dominates the trajectories of the orbiting objects. 

A couple of suggestions to try playing with the code.

  • Get the sun to wobble with the orbiting objects.
  • Set the satellites to have a mass equal to the sun.

Nice program Zock.

Small Basic - Shortcuts

$
0
0

Keyborard shortcuts are combination of keys pushing at the same time to do some functions.  There are some shortcuts for Small Basic IDE (Integrated Development Environment).  That are not documented so far.  So, today I'll show you my recognition about shortcuts for Small Basic IDE.  If you know other shortcuts, please let me know.

 
 

Press this keyTo do this
Ctrl+NNew
Ctrl+OOpen
Ctrl+SSave
Ctrl+XCut
Ctrl+CCopy
Ctrl+VPaste
Ctrl+ZUndo
Ctrl+YRedo
F5Run
Ctrl+ASelect All
Ctrl+FFind
F3Find Next
Ctrl+HomeCursor to Top
Ctrl+EndCursor to End
Ctrl+LDelete Line
Ctrl+Shift+plus (+) or Ctrl+mouse wheel upZoom In
Ctrl+Shift+minus (-) or Ctrl+mouse wheel downZoom Out
CtrlTranslucent Intellisense

Small Basic - Flood Fill

$
0
0

A recent Small Basic post about filling a region left by Turtle trails revived an old flood fill program I wrote a while ago.

This is the forum thread, turtle small basic.

And this is the program to flood fill regions.

'FloodFill example - for some theory see http://en.wikipedia.org/wiki/Flood_fill
'Draw regions with left mouse button and fill with right mouse button
 
gw = GraphicsWindow.Width
gh = GraphicsWindow.Height
GraphicsWindow.MouseMove = OnMouseMove
GraphicsWindow.MouseDown = OnMouseDown
GraphicsWindow.MouseUp = OnMouseUp
 
mouseMove = 0
mouseDown = 0
rightClick = 0
 
While ("True")
  If (mouseDown = 1 And mouseMove = 1) Then
    xM = GraphicsWindow.MouseX
    yM = GraphicsWindow.MouseY
    GraphicsWindow.DrawLine(xMLast,yMLast,xM,yM)
    xMLast = xM
    yMLast = yM
    mouseMove = 0
  ElseIf (rightClick = 1) Then
    fillRegion()
    rightClick = 0
  EndIf
  Program.Delay(20)
EndWhile
 
Sub fillRegion
  Stack.PushValue("X",xMLast)
  Stack.PushValue("Y",yMLast)
  colOld = GraphicsWindow.GetPixel(xMLast,yMLast)
  colFill = GraphicsWindow.PenColor
  While (Stack.GetCount("X") > 0)
    x = Stack.PopValue("X")
    y = Stack.PopValue("Y")
    If (GraphicsWindow.GetPixel(x,y) <> colFill) Then 'We could have multiple entries in the stack at x,y so only process those we haven't dealt with
      GraphicsWindow.SetPixel(x,y,colFill)
      If (x > 0) Then
        If (GraphicsWindow.GetPixel(x-1,y) = colOld) Then
          Stack.PushValue("X",x-1)
          Stack.PushValue("Y",y)
        EndIf
      EndIf
      If (x < gw-1) Then 'X pixels go from 0 to gw-1
        If (GraphicsWindow.GetPixel(x+1,y) = colOld) Then
          Stack.PushValue("X",x+1)
          Stack.PushValue("Y",y)
        EndIf
      EndIf
      If (y > 0) Then
        If (GraphicsWindow.GetPixel(x,y-1) = colOld) Then
          Stack.PushValue("X",x)
          Stack.PushValue("Y",y-1)
        EndIf
      EndIf
      If (y < gh-1) Then ''Y pixels go from 0 to gh-1
        If (GraphicsWindow.GetPixel(x,y+1) = colOld) Then
          Stack.PushValue("X",x)
          Stack.PushValue("Y",y+1)
        EndIf
      EndIf
    EndIf
  EndWhile
EndSub
 
Sub OnMouseMove
  mouseMove = 1
EndSub
 
Sub OnMouseDown
  GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()
  xMLast = GraphicsWindow.MouseX
  yMLast = GraphicsWindow.MouseY
  If (Mouse.IsLeftButtonDown) Then
    mouseDown = 1
  ElseIf (Mouse.IsRightButtonDown) Then
    rightClick = 1
  EndIf
EndSub
 
Sub OnMouseUp
  mouseDown = 0
EndSub

 

While this program works fine, it is slow.

I added a new method to the LitDev extension to do a 'flood fill' quicker.  Internally it uses exactly the same method, but doesn't have to load the drawing bitmap and other over-heads for each end every pixel check or change.

The new command is about 100 times faster and replaces fillRegion() with LDGraphicsWindow.FloodFill(GraphicsWindow.MouseX,GraphicsWindow.MouseY,GraphicsWindow.PenColor) in the code sample.


Shadow Boxing - Featured Small Basic Program

Small Basic: Did you Know? - Featured Article

$
0
0

Today we'll take a look at a fantastic TechNet Wiki article from :

Small Basic: Did You Know?

  

This is a fun one...

  • You can make the Intellisense Window translucent by holding down the Control key.  Useful to see the text underneath.

   

This is one of my favorites: 

  • Double clicking on the compiler errors will take you to the actual error.
 
That one in particular comes from the Small Basic creator, Vijaye, in this Forum thread: http://social.msdn.microsoft.com/Forums/en-US/683a3033-a3b9-4df1-92dc-0bc184e72ee5/did-you-know?forum=smallbasic 
 
Check out the article here:
  
  
Did you learn anything new? What did you learn?
   - Ninja Ed

Small Basic International Resources - Featured Article

$
0
0

Today I'd like to introduce TechNet Wiki article "Small Basic: International Resources".  There are 23 languages of resources as follows.  If you find other language resources, please let me know.  Thanks.

LanguageIDEReferenceGuideCurriculumWikiBooksVideosTwitterFacebook
Arabic✔      
Chinese (Simplified)     
Chinese (Traditional)    
Croatian      
Czech     
Dutch     
English
French   
German   
Greek        
Hebrew      
Hindi        
Hungarian        
Icelandic       
Italian   
Japanese  
Korean     
Polish     
Portuguese (Brazil)   
Portuguese (Portugal)    
Russian  
Spanish    
Turkish    

 

Small Basic Challenges of the Month - October 2014

$
0
0

Special thanks to LitDev, as always, for hosting these challenges for us!

These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using Small Basic. Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!

Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month. The only rule is that your solution must use standard Small Basic methods (no extensions).

It would be good if people could post their problems with these challenges so that a discussion can start so that everyone can learn from each other.

Also post feedback on the kind of challenges that you want to see more of in the future.

Number Challenge

Write a program to convert between Roman Numerals and numbers.

Game Challenge

Write a 'moon lander' type program.

Graphical Challenge 1

Make an animated growing tree.

From seed to seedling to sapling to tree with branches.

Tip: Perhaps consider using zoom and opacity with the animation.

Graphical Challenge 2

Make a color wheel or color cube.

You may need to use GetPixel, SetPixel and GetColorFromRGB methods in the GraphicsWindow object.

Can you find a faster way (not using extensions of course).

 

Use this with the 'Introducing Small Basic' paint program that comes with the installation (copied below) to select brush colours.

GraphicsWindow.MouseMove = OnMouseMove
GraphicsWindow.MouseDown = OnMouseDown
Sub OnMouseDown
  prevX = GraphicsWindow.MouseX
  prevY = GraphicsWindow.MouseY
EndSub
Sub OnMouseMove
  x = GraphicsWindow.MouseX
  y = GraphicsWindow.MouseY
  If (Mouse.IsLeftButtonDown) Then
    GraphicsWindow.DrawLine(prevX, prevY, x, y)
  EndIf
  prevX = x
  prevY = y
EndSub

 

Community Suggestion (By Nonki)

  1. Make a TODO list management program
  2. Draw (or fill) a pentagon
  3. Make a Sunrise Animation

 

Do you have an idea for a future challenge? Please post it here!

 

We look forward to discussing your solutions! Remember to post your solutions in this forum thread: http://social.msdn.microsoft.com/Forums/en-US/64c300a5-334b-450a-bdbd-fb368d8cb2ba/challenge-of-the-month-october-2014?forum=smallbasic

   - Ninja Ed

Small Basic: Difference between Local and Remote - Featured Article

$
0
0

After publishing your program to Small Basic listing server, you may find problems in your program running in your browser with Silverlight.  A TechNet Wiki article "Small Basic: Difference between Local and Remote" shows the difference of behavior when the Small Basic running under desktop and under internet browsers.  In this article, you can find details of issues including workaround.

In this article, there are 34 difference between local (desktop) and remote (browser).  So, please check this list first when your program has strange behavior in a browser.


In my case, I wrote a simple Paint program MQB393 as a challenge for Challenge of the Month - October 2014.  But this program doesn't work properly in remote.  I used GraphicsWindow.GetPixel() operation and GraphicsWIndow.MouseX and GraphicsWindow.MouseY properties in this program.  But these operation and properties have some issues.  In this program, following two issues were the problems.

  • GraphicsWindow.GetPixel(x, y) doesn’t work properly if x or y has after decimal point in remote.
  • GraphicsWindow.MouseX and GraphicsWindow.MouseY don’t return integer in remote.

GraphicsWindow.MouseX and GraphicsWindow.MouseY returns such like (200.5, 100.3).  And GraphicsWindow.GetPixel(200.5, 100.3) returns a color from a different co-ordinate.  So selecting color from color wheel picks wrong color (in many case it becomes black).

So, to avoid this issue, I added Math.Round() for both GraphicsWIndow.MouseX and GraphicsWindow.MouseY.  The updated program MQB393-0 works well even in browsers.  And I wrote an article about details of this issue as "Small Basic Known Issue: 26992 - GraphicsWindow.GetPixel(X, Y) Doesn’t Work Properly If X Or Y Has after the Decimal Point in Remote".

I added unique numbers for known issues such like 26992 above.  This number is from TechNet Wiki article number because it's unique.


By the way, I am a little worried by words local and remote.  I defined in the known issues articles that in local means in desktop Small Basic program complied by the IDE.  And in remote means in Small Basic listing server displayed with a browser which has Silverlight plug-in.  But the browser with Silverlight is a desktop program which runs in a local PC.

If you find good words to represent these difference of environments, please let me know.

And also if you find new difference between local and remote, please let me know or add the issue into the list.

Thanks.

Calling all Small Basic Gurus! Now is your time! Step up and be counted!

$
0
0

Dear clever clogs and smarty pants!

We need YOU to lighten up our dark evenings and warm our hearts with your TechNet Wiki articles!

Yes, it's THAT time of the month again, submissions time!

September has seen a huge amount of amazing content from our community, providing plenty of fresh and fruity facts and figures to fill the tummies of techies, the world over.

We have some new manes. Some legends. Some icons!!

TechNet Wiki Gurus are beloved the world over and treasured by their countries.

Now is your turn.

You've waited all of your life for this.

Mark this moment as where it all began...

This is where your amazing future starts for you!

 

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

 

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

 

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

 

HOW TO WIN

 

1) Please copy over your Microsoft technical solutions and revelations to TechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

 

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

 

Winning this award in your favoured technology will help us learn the active members in each community.

 

Feel free to ask any questions below.

 

More about TechNet Guru Awards

 

Thanks in advance! 
Ninja Ed & Pete Laker 

Uppercase or Lowercase in Small Basic

$
0
0

Small Basic language itself is case-insensitive.  So, for example, variable name number and Number are the same.

There is not a clear guidelines about casing in Small Basic so far.  But, for readability of source programs, we should be careful about casing.  And, Small Basic is one of .NET languages.  So, I recommend to use .NET guidelines about naming conventions.

In a TechNet article "Small Basic: Programming Tips" has a description about casing for Variable names.  It says:

There are conventions for variable naming, but most common is to mainly use lower case and capitalise each word apart from the first (that remains lower case).

In Small Basic, we can name for variables, labels, and subroutines.  Following list is my recommendation.

Name forCasingExample
variableCamelprevX
labelPascalRunLoop:
subroutinePascalOnMouseDown()

 

Camel casing is starting with lowercase, and Pascal casing is starting with uppercase.  Example names above are from "Introducing Small Basic (Get Starting Guide)".

In addition, I'd like to talk about text in Small Basic.  In condition with = (equal) operation, text is case-sensitive.  So, for example, the condition ("number" = "Number") becomes "False".  If you'd like to allow both uppercase and lowercase for input, you will better to use Text.ConverToLowerCase() or Text.ConvertToUpperCase() operations before checking it.  But following cases, the texts are case-insensitive.

  • color names - ex. "LightGray" and "lightgray" are the same
  • array indices - ex. month["October"] and month["OCTOBER"] are the same

See Also

.NET Framework 3.5 | Design Guidelines for Developing Class Libraries | Capitalization Conventions


Shapes Editor 1.7b - Small Basic Featured Program

$
0
0

I published Shapes 1.7b (XFZ657-16) yesterday.  This program is a shapes (picture) editor.  I'd like to talk about this new version.

New Features

There are two new points in 1.7b.

  • Added grid feature - [Grid] toggles grid display
  • Changed window size to 598 x 428 pixels

The grid step is 10 pixels.  This will allow users to adjust shapes sizes.  Change about window size is for future support in remote (in a browser with Silverlight on Small Basic program listing server).  598 x 428 is the best size for both in local and in remote. [*1]

Publish Error

Version 1.5b was compact so there was no error when it published.  But 1.7b is too large for publish to the server.  So, I separated [Open] subroutines into an other source GTV460-1.  These subroutines treat local file.  So they don't run in remote anyway.  I had an another choice to upload 1.7b full source to TechNet Gallery.  But for following two reasons, I decided to separate this program and publish them.  One is for running this program in remote.  The other reason is to confirm a bug fix described below.

Minor Bug Fix

1.5b and older version has a minor bug that the position of scissors in menu was wrong.  For long time, I couldn't find this reason of the bug.  But recently, I found a timing issue about shapes image rotation. [*2]  Though the scissors are not image but triangles and ellipses, I tried to insert Program.Delay() just after shapes added before their rotation.  This works well.  So, I will write about this issue as a TechNet Wiki article.

Known Issues

There are still known issues when this program runs in remote. I'd like to fix these issues and make Shapes available in remote.

  • Rotated Triangle and Line become wrong places.
  • Grid sometimes becomes pale color.
  • [Open] is not supported.
  • [Save] creates only main and Shapes_Init subroutine.  Other subroutines are not created.

For the Future

Shapes object is useful to write animation program.  So, I tried to make this Shapes editor.  But if there are many shapes to move, the program will become complex and slow.  So I started to try conversion from Shapes picture to .png file with PowerPoint VBA. [*3] And I'm very interested in sharing Shapes data with other program languages.

[*1] Small Basic Known Issue: 22108 - Viewport of GraphicsWindow is Narrower and Sometimes Resized in Remote (TechNet Wiki)

[*2] Small Basic Known Issue: 24270 - Shape Image is Not Zoomed from Center in Remote (TechNet Wiki)

[*3] Small Basic: Duck Shoot Images: PowerPoint Macro-Enabled Presentation (TechNet Gallery)


See Also

Small Basic: Rotate Triangle and Line

$
0
0

Once I wrote an article about how to rotate Shapes not from the center on TechNet Wiki.  And that article was featured on this blog.  That article was for Rectangle and Ellipse.

Today I will introduce about rotation for Triangle and Line.  

Rotation Center

Rectangle and Ellipse are rotated from their center.  But Triangle and Line are not always rotated from their center.  I wrote an article about Rotation Centers for Shapes of Triangle and Line.  For example, a triangle created with Shapes.AddTriangle(50, 150, 150, 50, 150, 150) has its rotation center out of the shape.

Known Issue

But the logic to determine the center for Triangle and Line is different between local and remote.  In remote, the center is always it's origin in definition co-ordinate.  Details about this know issue is described here.

Another Way to Rotate Shapes Not from the Center

From the special logic for triangle and line to determine the rotation center and the known issue in remote, I found a good way to rotate Shapes not from the center.  The way is especially for Line.  For example a line defined as Shapes.AddLine(0, 0, 0, -100) is rotated from the origin (one end point of the line ) in definition co-ordinate of the line.  And this way is available both for in local and in remote.  This may be a simple way to create clock hands. You can try to rotate line with a sample program KSL776.  Click two end points with this program.  You can select next points after the rotation.

 

Small Basic Featured Program - Boxing Game

$
0
0

Following on from NaochanON's shaddow boxing animation recently blogged, he has developped it further into a boxing game.

You are the fighter on the left (gray with red gloves) with the computer player on the right (green with blue gloves).   The keys to control your fighter are shown below.

  • Left, Right......walking
  • Up, Down......weaving
  • Space key.....punching

The download code is BGT587-0.  The code is well structured and runs smoothly, I especially like the AI of the boxing opponent. 

The animation code looks quite complex with a lot of multi-dimensional arrays, but with a little studying it all becomes clear.  It would be simpler using a series of boxer images in different positions, but not as interesting or challenging as animating the joints of the fighters geometrically.

Can you beat my score (76 hits to 19).

If you have a program of any sort that you would like to be blogged about, then post a link to it on the Small Basic forum.

Create Real Console Mode Program in Small Basic - Featured Thread

$
0
0

Today, I'd like to introduce a thread in Small Basic forum.  The thread is "Create real Console mode program in SB" posted by Pappa Lapub.  This thread is a general discussion in the forum and shows how to create real console mode program with Small Basic and a freeware utility Application Mode Changer created by Nir Sofer.

avator


 

Sometimes badly wanted to write a real console mode program in SB, that works like a real command line program and not via SB TextWindow. And i think, i finally found a way to make that possible. See screenshots:

These demos show 4 SB programs to perform simple calculations, directory listings (similar CMD internal 'dir' command), download/response header check from commandline and playing music/sound/speech from command line (CMD.exe). This is NOT the SB TextWindow, but inputs and outputs are directly in/from cmd.exe StdIn, StdOut.

Compiled a simple demo extension (SBCmd.dll with all used methods in a single class) for this demos to work (all sources and infos included). Modify as you like it. All of the demos use SBCmd.dll (+ JSEval.dll ) and 2 of them also LitDev extension.

Additionally you will need AppModeChanger from Nir Sofer to patch the original .exes compiled via SBIDE or from SmallBasicCompiler.exe. Links also included. If someone is interested, here are the needed bits and infos...

Download: SBCmd_Engl.zip (393 KB)

PS: Changed link, after found out that SBConCalc.sb/.exe and SBConDir.sb/.exe  contained class names, that would not be found on other systems. Should fit now. Hope so!


Visit this thread here. Thank you sharing this information, Pappa Lapub.

Small Basic Guru Winners! - September 2014

$
0
0

We have some winners! A thank you goes out to Philip and Nonki!

 

Guru Award Small Basic Technical Guru - September 2014  

Gold Award Winner

 

Philip MuntsSmall Basic: For Windows 8.1 Tablet

Michiel Van Hoorn: "Great article for those (1) want to make apps for tablet form factors and (2) are looking to package a SB app into a package."

Ed Price: "I love it! What an important topic!"

Silver Award Winner

 

Nonki TakahashiSmall Basic: Emoji

Michiel Van Hoorn: "Another entry from Nonki which opens up new possibilities. This time Emoji and the font editing."

Ed Price: "This is incredibly interesting!"

Bronze Award Winner

 

Nonki TakahashiSmall Basic: Dictionary

Michiel Van Hoorn: "Simple entry on a powerful feature"

Ed Price: "Great overview of the Dictionary Object! Good job integrating the Known Issues and the See Also section!"

Also worth a mention were the other entries this month:

 

A great month for Small Basic content!

   - Ninja Ed

Viewing all 669 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>