View Full Version : Really Really new here...
spiritsoul
17-11-2008, 02:42
I'm so new here, I don't even know I'm here yet.
I've been looking at the various command structures and can't even get to first base with anything.
I tried to clear the screen as a programming step. Ok, that don't work.
I tried to print a statement. Ok, that don't work.
I realize that I have to learn a totally new language, and am willing, but don't know where to start. The expressed capabilities of this basic language, seems to be what I need in order to do what I want to do (access the internet). I am trying to build a program which will allow me to log into my stock program, and be able to download data from the stock server, as I trade, then analyze what I have done. I know that sounds ambitious for someone who can't even yet print a simple statement, but all I can say is HELP????
Love this line... "I'm so new here, I don't even know I'm here yet." (I have ADD, that strikes me off my computer chair!)
Are you using the ThinAIR part?
That is the GUI for programming.
There are a TON of samples, if you go into ThinAIR and select "FILE" then "OPEN", it should take you right to the samples folder.
For a NEW program, you will first have to save it, before it can run. (In the event that ThinAIR crashes, you will be glad that it saved the code first.)
Make a NEW file... Choose BLANK...
Paste this code...
USES "Console"
PRINTL "Hello"
PRINTL "WOOT!"
PRINTL ""
PRINTL "Hit [x] to BEEP, or any other key to exit."
DIM ResultKey AS STRING
ResultKey = UCASE$(WAITKEY)
IF ResultKey = "[X]" THEN
BEEP
END IF
CLS
PRINTL "Exiting..."
WAITKEY (2)
However, that is NOTHING compared to what ThinBASIC can handle...
Try the samples, and rummage through the help files. The "CORE" functions and other "MODULES" are full of additional functions.
With one line, you can DOWNLOAD URL TO FILE... Which may be something you can use later.
All the "CORE" commands are built-in...
For other "Modules", you have to say...
USES "ThisModule"
And now those commands will work. (The help-file has all the good details.)
EG, For "Windows", you want...
USES "UI"
That holds all the User Interface stuff, as opposed to the DOS style console. Which is not good for user input. (Too complex to program for, and too limited for display results. But great if you just want simple LOGIN and DOWNLOAD feedback.)
You may have a little trouble connecting to a "Stock Profile", as they tend to use special programs, or depend on InternetSSL connections. The web-Browser uses a cookie, to track you, as a secured user. I don't think they have a full internet-wrapper, but there is ALWAYS a way...
USES "INET"
USES "FTP"
Those two may offer you something to work with.
There is always API, and other DLL's.
spiritsoul
17-11-2008, 08:53
Love this line... "I'm so new here, I don't even know I'm here yet." (I have ADD, that strikes me off my computer chair!)
Are you using the ThinAIR part?
That is the GUI for programming.
There are a TON of samples, if you go into ThinAIR and select "FILE" then "OPEN", it should take you right to the samples folder.
For a NEW program, you will first have to save it, before it can run. (In the event that ThinAIR crashes, you will be glad that it saved the code first.)
Make a NEW file... Choose BLANK...
Paste this code...
USES "Console"
PRINTL "Hello"
PRINTL "WOOT!"
PRINTL ""
PRINTL "Hit [x] to BEEP, or any other key to exit."
DIM ResultKey AS STRING
ResultKey = UCASE$(WAITKEY)
IF ResultKey = "[X]" THEN
BEEP
END IF
CLS
PRINTL "Exiting..."
WAITKEY (2)
However, that is NOTHING compared to what ThinBASIC can handle...
Try the samples, and rummage through the help files. The "CORE" functions and other "MODULES" are full of additional functions.
With one line, you can DOWNLOAD URL TO FILE... Which may be something you can use later.
Thanks "ISAWHIM". Everything in your sample program worked, except fot the CLS... Don't know why it wouldn't work, but it didn't. Gave me the error page. I put a ' (rem) in front of it and the rest of the program worked fine. Something with my computer maybe. I have been studying the examples you spoke of, and have run several of them, and studied them. I am beginning to see just a smidgeon of light at the end of the tunnel. Probably an oncoming train...
Thanks again. I appreciate the help in getting started.
ErosOlmi
17-11-2008, 09:10
@ISAWHIM
Thanks fot eh support.
@spiritsoul
Ciao and welcome to thinBasic community.
I think your initial problems are related to the fact that thinBasic is a modular language composed by many different modules. Every module is in charge of some specific aspect and language keywords. So, for example, we have CONSOLE module that implements console commands, FILE module that implements commands working on files and directories, INET module that have some internet commands, ... and so on.
We have a central module called CORE that is in charge of the main language functionalities.
When you need to work with commands, you have to check in which module they are implemented. Except for the CORE module (that is loaded automatically) all the other modules are loaded on request using the USES keyword followed by a string representing the name of the module to be loaded.
So we have
USES "Console" '---To load the Console module and all its keywords
...
USES "FILE" '---To load the FILE module and all its keywords
...
USES "INET" '---To load the INet module and all its keywords
...
Regarding the CLS keyword not working, try CONSOLE_CLS instead.
Recently we created some ALIAS to short some often used console commands. CLS will be present in next version.
On your idea to connect and download some stock files to be analyzed, if your web server uses just HTTP protocol, there should be no big problems but if your web server uses HTTPS, I do not know how to because I've never tried but we can see what to do. For example we can think to use some external lib that does the connection job for us.
Ciao
Eros
spiritsoul
17-11-2008, 19:18
@ISAWHIM
Thanks fot eh support.
@spiritsoul
Ciao and welcome to thinBasic community.
I think your initial problems are related to the fact that thinBasic is a modular language composed by many different modules. Every module is in charge of some specific aspect and language keywords. So, for example, we have CONSOLE module that implements console commands, FILE module that implements commands working on files and directories, INET module that have some internet commands, ... and so on.
We have a central module called CORE that is in charge of the main language functionalities.
When you need to work with commands, you have to check in which module they are implemented. Except for the CORE module (that is loaded automatically) all the other modules are loaded on request using the USES keyword followed by a string representing the name of the module to be loaded.
So we have
USES "Console" '---To load the Console module and all its keywords
...
USES "FILE" '---To load the FILE module and all its keywords
...
USES "INET" '---To load the INet module and all its keywords
...
Regarding the CLS keyword not working, try CONSOLE_CLS instead.
Recently we created some ALIAS to short some often used console commands. CLS will be present in next version.
On your idea to connect and download some stock files to be analyzed, if your web server uses just HTTP protocol, there should be no big problems but if your web server uses HTTPS, I do not know how to because I've never tried but we can see what to do. For example we can think to use some external lib that does the connection job for us.
Ciao
Eros
Hello Eros, and thank you. I think I'm getting the idea now. Tried the console_cls with the "use console" and it works fine now. I used to own a business that used basic as it's programming code about 40 years ago. Wow. Basic has changed a lot, but I'll get it.
One question would be, how to find out what commands are in each module. I think if I could find those and list them out on paper, I could begin to make progress.
I know - going into the project - that I may not be able to get the real-time data out of the stock system, but for now, I will just shoot for getting the thin-basic program to log in and insert my username and password to bring up my user screens. That's a good start. Once I get that far, I'll see what I can do next.
For now, I'm just glad to find a basic program that will access the internet and allow me to work on it to whatever degree I can manage.
I appreciate your help in providing understanding of this system.
Bob
Michael Clease
17-11-2008, 19:50
Hello Bob,
All the information you need about the commands is available in the help files or just click on word and press F1 and the help file will be displayed.
To lookup specific keywords look in the modules section of the help, failing that just ask here, people are very helpful on this forum so dont worry if it seems like a stupid question ask anyway.
spiritsoul
17-11-2008, 20:28
Hello Bob,
All the information you need about the commands is available in the help files or just click on word and press F1 and the help file will be displayed.
To lookup specific keywords look in the modules section of the help, failing that just ask here, people are very helpful on this forum so dont worry if it seems like a stupid question ask anyway.
Thanks Michael,
I had just found the help files listings about 10 minutes ago. Glad to know about the F1 use too. Nice group here, that's for sure. And I do appreciate the help.]]
Bob
Petr Schreiber
17-11-2008, 20:41
Hi spiritsoul,
you mentioned you used BASIC long time ago.
Maybe you could read article "Legacy BASIC code and ThinBasic" published in our ThinBasic Journal :).
Download in PDF here: Click (http://community.thinbasic.com/index.php?topic=1865.msg13758#msg13758)
I hope you will like ThinBasic.
Petr
Michael Hartlef
17-11-2008, 21:47
Hi Bob,
welcome on board.
:)
Michael
spiritsoul
18-11-2008, 02:04
Hi spiritsoul,
you mentioned you used BASIC long time ago.
Maybe you could read article "Legacy BASIC code and ThinBasic" published in our ThinBasic Journal :).
Download in PDF here: Click (http://community.thinbasic.com/index.php?topic=1865.msg13758#msg13758)
I hope you will like ThinBasic.
Petr
Thank You Petr.
I will definately look it up. Thanks for the help...
spiritsoul
18-11-2008, 03:28
Hi spiritsoul,
you mentioned you used BASIC long time ago.
Maybe you could read article "Legacy BASIC code and ThinBasic" published in our ThinBasic Journal :).
Download in PDF here: Click (http://community.thinbasic.com/index.php?topic=1865.msg13758#msg13758)
I hope you will like ThinBasic.
Petr
Hello Petr,
I looked over the Journal and find it quite interesting. Yes there are changes to the old basic, and the old basic wouldn't access the internet, at least in my day as a programmer. I'm looking forward to learning the newer basic structures and commands. I've been doing a lot of looking at commands, and it is obvious that my work is cut out for me. One thing I've already latched onto, is making a template to just "use (all modules) at the beginning of a program, so you can automatically use any command you wish. That way, all I have to do is learn the commands and their uses.
Thanks again.
Bob
spiritsoul
18-11-2008, 03:34
Hi Bob,
welcome on board.
:)
Michael
Thanks Michael. I'm already enjoying the forum and getting some initial program ideas going.
Bob
Hi Bob, welcome to the forum. :)
spiritsoul
18-11-2008, 05:16
Hi Bob, welcome to the forum. :)
Thanks Matthew. Glad to be here.
ErosOlmi
18-11-2008, 13:25
Wow. Basic has changed a lot, but I'll get it.
Well,
thinBasic is just one of the many BASIC around. I'm sure you will find people even thinking that, at the end, thinBasic is not so similar to BASIC. But that's it. That is our way to think about a powerful and feature rich Basic programming language and more: a nice and live support service here in forum thanks to very nice people willing to help each other.
There are many Basic with different features, different ways to solve the same problems. You just need to find your Basic, where you feel more comfortable to work with.
I hope you will find thinBasic your Basic otherwise feel free to express your impressions even if negative. We will try our best to get your feeling and possibly improve thinBasic.
Ciao
Eros
ErosOlmi
18-11-2008, 13:31
One thing I've already latched onto, is making a template to just "use (all modules) at the beginning of a program, so you can automatically use any command you wish. That way, all I have to do is learn the commands and their uses.
Bob,
there is a script that creates a list of thinBasic keywords that can help you.
Go into \thinBasic\SampleScripts\General\Keywords\ directory and see Keywords.tBasic script. This script loads almost all thinBasic modules and creates a text file with all keywords present in the loaded modules. You can use it as template for your scripts.
Attention: do not use for your final script because if you want to create a thinBasic bundled executable, you will have a big EXE file at the end because all used modules will be included into the EXE.
Ciao
Eros
spiritsoul
18-11-2008, 13:40
Wow. Basic has changed a lot, but I'll get it.
Well,
thinBasic is just one of the many BASIC around. I'm sure you will find people even thinking that, at the end, thinBasic is not so similar to BASIC. But that's it. That is our way to think about a powerful and feature rich Basic programming language and more: a nice and live support service here in forum thanks to very nice people willing to help each other.
There are many Basic with different features, different ways to solve the same problems. You just need to find your Basic, where you feel more comfortable to work with.
I hope you will find thinBasic your Basic otherwise feel free to express your impressions even if negative. We will try our best to get your feeling and possibly improve thinBasic.
Ciao
Eros
I see your point, and agree. That makes good sense. Thanks. I think thinBasic will do fine for my needs. It seems to have a vast supply of programming aids, keywords, etc... More than enough to do what I need to do.
While I'm on here, another question... Where should I place posts to deal with programming problems, as I'm already seeing myh lack of knowledge, like how to set up and print the various date functions in the "use DT" module?
Bob
ErosOlmi
18-11-2008, 13:45
There is a front forum called "Modules specific issues" (http://community.thinbasic.com/index.php?board=52.0) where you will find specific forums for specific thinBasic modules. Start from there to post questions on specific modules.
Anyhow be sure to check the many scripts you will find into \thinBasic\SampleScript\
Also there you will find scripts separated by modules.
Ciao
Eros
spiritsoul
18-11-2008, 13:57
There is a front forum called "Modules specific issues" (http://community.thinbasic.com/index.php?board=52.0) where you will find specific forums for specific thinBasic modules. Start from there to post questions on specific modules.
Anyhow be sure to check the many scripts you will find into \thinBasic\SampleScript\
Also there you will find scripts separated by modules.
Ciao
Eros
spiritsoul
18-11-2008, 14:00
There is a front forum called "Modules specific issues" (http://community.thinbasic.com/index.php?board=52.0) where you will find specific forums for specific thinBasic modules. Start from there to post questions on specific modules.
Anyhow be sure to check the many scripts you will find into \thinBasic\SampleScript\
Also there you will find scripts separated by modules.
Ciao
Eros
Thanks Eros,
I have found the module on DT and tried several of the commands and still need to go to the group mentioned above and ask questions about it.
Thanks again,
Bob