Stumbled on Small Basic yesterday...

...luckily I landed in a soft patch.

New to SB but I've been programming in QB for 25+ years now. Mostly non-graphics stuff like business apps. I love BASIC but I never did develop a fondness for other programming languages. I always wanted to put stuff on Android devices, so this seemed like the right choice to avoid learning JAVA, which at my age I'm lucky if I can spell it correctly. It may take me a while to get started, as I have a few projects in the works at the moment. I hope to get a download this week and look into making a few simple things with SB by years end.

My thanks to Chris for letting me join the forum. He probably already regrets that decision but hey, according to some numerologist, the world is supposed to end in a couple of days anyway. Maybe my first SB program should be, "Goodbye World!" I'm just saying...

Pete

It might be. I'm not sure. I seem to have suffered some temporary amnesia from that stumble I had in the soft patch, yesterday. Yikes, I have a stalker! Yeah, that's me. Nice to see a familiar avatar here. In regard to that right click thingy... That makes me think SB runs interpreted. QBasic was that way. QuickBasic allowed for stand-alone exe files to be created. Does SB offer a stand-alone option? Oh no, I may never find out. It seems I need to answer a captcha question to post this reply... and it's a math problem. This could take awhile... 2 + 8 equals ???

Pete

... but you will like the speed of compiles! A little slower than QB64, but fast enough for some fun graphics.

Also check downloads for your Android device, free from GooglePlay. Chris might like feedback from Android user.

I think I will probably end up buying a USB on the go adapter. I don;t ever see myself programming on a tablet keyboard. I see there is a setup to allow port access through the router. That's nice, but I have no idea about how I find that port number. Any ideas? I mean I recall some router setup crap from the past that took about 30 steps. If that were the case here, I would think there would be a link to the process. Normally I would just write code and save it to the SD card but learning as you go makes getting it right more difficult that way. The fastest way I can see is typing straight into the ide and trying the code out as the program gets built.

Pete

Sorry, port stuff is beyond me. I use USB to my device. Apparently Windows 10 can access places on my Android NOOK I haven't figured out through SB. So I have recently written changes to .bas files and transfered them over through USB by way of Windows Explorer to test them. (I was testing them through On-line samples before that changed.) As you say, writing code on tablet keyboard is awkward at best, on mine you have to shift through 3 keyboards and where is right mouse clicking pop-up menus (the IDE) when you need it?

Maybe Chris or someone knows alternate methods.

Hope this helps, let me know if something doesn't work on make any sense.

Cheers,
Chris

1. Ensure your desktop and android machines are both connected to the same local WIFI network.
2. On the android device, start SmallBASIC then click "Setup".
3. At the port number prompt, enter 8080.
4. After seeing the restart prompt, click the 'Back' key several times to stop SmallBASIC.
5. Start android SmallBASIC, then click the "About" link. You should see Web Service and Access token details.
6. Switch over to your desktop machine and start SmallBASIC.
7. Click the right mouse button to show the menu. You should see an option "Editor [ON]".
Note: clicking this option (via left mouse button) will toggle values for this option.
In the next update (0.12.10) the "Live Mode" option will be removed in favour of something much better!
8. Click on a .bas file. You should see the file loaded into the programming editor.
9. Press the F3 Key. You should see a prompt at the bottom of the screen:
"Export to mobile SmallBASIC. Enter :"
Type in the "Web Service" details as you saw from step 5.
You should see: "Enter Token, Esc=Close"
Enter the "Access token" value also from step 5. Press enter.
10. Switch back to your android device. The program should either be running or appear in the editor depending on android SBs "Editor [XX]" setting.

Note: The access token only provides a trivial level of protection against someone else running SmallBASIC code on your phone. The connection doesn't use encryption so an intruder on your network could learn the code. You can set the port back to "-1" to disable this feature.

Forgot to mention:
- You can mitigate the security aspect by leaving the editor setting turned ON. Then the remote code will display in the editor, but won't run until you select run from the menu.
- In the desktop version, once you have entered the IP+Port settings correctly, press F4 to send again (without entering new details)

Very nice!
I would only like to have an option to save it on the Android device permanently...
Or, at least to have a "select all" option in editor, so I could copy to Clipboard...
Due to some minor differences between PC and Android, sometimes some permanent changes are needed.
Also it would be nice if the PC version could store the settings of ports somewhere, so via some function key they could be accessed...
Maybe something of these things exist, I just can't find them...
Cheers!

For now, I use Total Commander for Android and its LAN-plug-in, and TotalCmdWifi....

They work excellent for me.

Thanks for you kind attn.

Cheers

I'll add the "Select All" menu option in the next update. I'll also add code to save and restore the export details.