View Full Version : Newbie
johnph77
05-04-2009, 20:56
New to this forum, new to thinBasic, been around basic programming for a while - can't believe I wrote my first BASIC program 30 years ago.
About to download thinBasic. Will use it to perform math functions mostly related to games of chance, including lottery and Keno, but other uses as well.
Have yet to fill out profile but that's next on the agenda.
Thanks.
Petr Schreiber
05-04-2009, 21:07
Welcome to the forum,
I hope TB will serve you well - it has wide variety of math functions you might find useful.
In case you are used to older BASICs, you could have a look at article "Legacy BASIC code and ThinBasic" in ThinBasic Journal #1 (http://community.thinbasic.com/index.php?topic=1865.msg13758#msg13758).
Petr
ErosOlmi
05-04-2009, 21:19
Ciao John and welcome to thinBasic community forum.
Hope you will find thinBasic useful. Do not hesitate to ask in case you will find any difficulties. We will do our best to help.
Ciao
Eros
johnph77
05-04-2009, 23:18
OK, let's try it. ThinBasic installs on both my computers but will not start. OS is Windows Vista Ultimate. When I try to start either the graphics version or the console version the appropriate box will briefly flash, then disappear. I've tried uninstalling and reinstalling with the same results. What am I doing wrong or what did I do wrong?
ErosOlmi
05-04-2009, 23:28
We have tested and used successfully thinBasic from Win98 to Windows 7 passing for Windows 2000 and 2003 server.
At office we use it on a daily basis also on some Vista Ultimate computers.
So there must be something "special" or unusual in your installation. Let's see if we can understand more:
Did you tried some examples and all give the same results? Try examples in \SampleScrips\General\Speed\ directory and see if at least one is running fine
Are you running your OS with an Admin user or a standard user?
Do you use some Anti Virus application? If yes, try to de-activate for a while and see if it makes any difference
Thanks
Eros
johnph77
06-04-2009, 01:36
We have tested and used successfully thinBasic from Win98 to Windows 7 passing for Windows 2003 and 2008 server.
At office we use it on a daily basis also on some Vista Ultimate computers.
So there must be something "special" or unusual in your installation. Let's see if we can understand more:
Did you tried some examples and all give the same results? Try examples in \SampleScrips\General\Speed\ directory and see if at least one is running fine
Are you running your OS with an Admin user or a standard user?
Do you use some Anti Virus application? If yes, try to de-activate for a while and see if it makes any difference
Thanks
Eros
All examples in \SampleScripts\General\Speed\ run fine.
The example SampleScripts\General\Math\Math_BitWise.tbasic leaves an edit screen on my computer in which I can place the cursor but as soon as I touch a key on the keyboard the screen disappears.
Running as Admin.
McAfee AntiVirus is on. Which area should I stop?
ErosOlmi
06-04-2009, 04:12
If the scripts I suggested are running fine, it means all is OK.
Instead, it is normal that some Console screen disappear. For example \SampleScripts\General\Math\Math_BitWise.tbasic does the job to show some tests than the script stopped with a WAITKEY command (see script sources). When a key is pressed, Console screen is closed. And this is normal.
If some Console example has no WAITKEY at the end, you will just see a Console Screen for a while and than it will be closed. Again this is normal.
To see the output of console scripts even when they finish, just open a Console window (Run CMD command in OS shell or find Console in Windows Utility) than run the script from the command prompt typing script name.
Another way is to open the script that uses Console commands and change it adding a WAITKEY at the end.
Let me know.
johnph77
06-04-2009, 08:34
If the scripts I suggested are running fine, it means all is OK.
Instead, it is normal that some Console screen disappear. For example \SampleScripts\General\Math\Math_BitWise.tbasic does the job to show some tests than the script stopped with a WAITKEY command (see script sources). When a key is pressed, Console screen is closed. And this is normal.
If some Console example has no WAITKEY at the end, you will just see a Console Screen for a while and than it will be closed. Again this is normal.
To see the output of console scripts even when they finish, just open a Console window (Run CMD command in OS shell or find Console in Windows Utility) than run the script from the command prompt typing script name.
Another way is to open the script that uses Console commands and change it adding a WAITKEY at the end.
Let me know.
Hmmmmm. Without having yet gone into the Help files, I'm guessing then that there's no onscreen debugger, and all BASIC code I write for thinBasic had better be correct before I attempt to run it. I'm already believing that any code I do write for it is going to have a ".tbasic" file extension before it'll run - not really a problem, because I can copy my current ".bas" files to the thinBasic folder, use the "help" files in modifying the code to thinBasic standards, and use my FTP software to change the extension. Correct?
But here's a killer. I'm doing this on a dual-core laptop. After I ran the demos, other software and the Internet were running rather slowly so I went into the Program Manager - there "thinBasic.exe" was, using 50% of my processor power and doing absolutely nothing. Outside of the Program Manager there was absolutely no indication on my screen that thinBasic was in operation - no output screen, no results, nothing. What was happening there?
BTW, thanks for your time with this.
Michael Hartlef
06-04-2009, 08:58
Hi John, welcome here on the forum.
OK, let's try it. ThinBasic installs on both my computers but will not start. OS is Windows Vista Ultimate. When I try to start either the graphics version or the console version the appropriate box will briefly flash, then disappear. I've tried uninstalling and reinstalling with the same results. What am I doing wrong or what did I do wrong?
Did you start a script via thinAIR or by double clicking on it? Or did you started thinBasic.exe or thinBasicC.exe?
Yes, thinBasic file extensions have to be either .tbasic or .tbasicc . If a script ends with .tbasic, thinbasic.exe will be automatically called to run it. A .tbasicc file will open thinBasicC.exe automatically. You never run these two exe files on your own.
Tonight, if nothing goes wrong family wise, I will produce a small video to show you the first steps when you start with thinBasic.
Regarding the left process inside the task manager. That can happen when a script crashes. Also there is a debugger in thinBasic but I never used it.
And like allways, an attached script can show us the problems better so if you can, allways attach a script with a bug report so we can help squishing the bugger. ThinBasic runs very very stable and all developers are very committed to improve and develop thinBasic further.
ErosOlmi
06-04-2009, 09:25
thinBasic has a script debugger called thinDebugger still under development: http://www.thinbasic.com/public/products/thinBasic/help/html/thindebug.htm
Open your script in thinAir (thinBasic editor) than press F8 (or click on relevant button in thinAir tollbar) and thinDebugger will come out.
Inside thinDebugger you can press F8 to step line by line. You can also set breakpoints.
Another way to start a script in Debug mode is to add to your script the following line:
uses "trace"
And here even another way you can start a script execution in debugging mode. Open a command prompt and run something like:
thinBasic.exe @D <full path script file name>
Regarding thinBasic.exe process remaining active and consuming CPU, yes it can happen when script hangs for some reason.
We are working to remove this problem but it is not easy because of the interpretative nature of the engine.
Eros
johnph77
06-04-2009, 23:03
Hi John, welcome here on the forum.
Did you start a script via thinAIR or by double clicking on it? Or did you started thinBasic.exe or thinBasicC.exe?
Yes, thinBasic file extensions have to be either .tbasic or .tbasicc . If a script ends with .tbasic, thinbasic.exe will be automatically called to run it. A .tbasicc file will open thinBasicC.exe automatically. You never run these two exe files on your own.
Tonight, if nothing goes wrong family wise, I will produce a small video to show you the first steps when you start with thinBasic.
Regarding the left process inside the task manager. That can happen when a script crashes. Also there is a debugger in thinBasic but I never used it.
And like allways, an attached script can show us the problems better so if you can, allways attach a script with a bug report so we can help squishing the bugger. ThinBasic runs very very stable and all developers are very committed to improve and develop thinBasic further.
I had started the "thinbasic.exe" and "thinBasicC.exe" files manually, not with thinAIR. Incidentally, I would suggest that, in the installation process, if this is the preferred method to be used for program startup, a desktop icon aimed at thinAIR.exe be installed. ThinAIR works, and I now have a screen in which I can create and edit scripts. BUT the help files within thinAIR are applicable to thinAIR only, not for creating and editing scripts. And the processes and requirements for doing so are so much different in thinBasic that what I have done in the past in GWBasic, BASICA, QBasic, and PowerBasic that help files are a must.
Michael Clease
06-04-2009, 23:18
Hello John
Press F1 and the help will appear as if by :wizard:
Michael Hartlef
06-04-2009, 23:21
Or press in the help menu the third entry.
John, when making suggestions, it is the best to post them in the suggestions area of this forum. This way they don't get lost.
ErosOlmi
06-04-2009, 23:21
Well, we have to improve startup learning operations, tutorials on how to start with thinBasic. I agree on that.
Anyhow, I think the best way to start is to use Windows Explorer.
Run Explorer.
Go into the many directories under \thinBasic\SampleScripts\ directory.
Open any sub directory you are interested.
Point to the script you like.
Use the mouse:
- double click on a script to execute
- right click on a script and from contest menu choose Edit to start thinAir and edit the script.
- from inside thinAir, click on any thinBasic keyword and press F1 to have specific help
I will try to find a way and find some ideas on how to improve operations just after thinBasic installation.
Ciao
Eros