Hi, I’m certain I’m missing something obvious so let me explain then ask a question. The last time I did any coding/programming was 30 years ago and then I only used Basic and Assembly Language. Now I’ve retired I thought I’d try my hand at writing a TBScript.
I’ve read the pdf documents from Terabytes website which gives the command structures and syntax but nowhere can I find how to actually use that information. In basic I would write something then test/correct/test etc till it worked correctly. I cannot for the life of me work out how to do that with TBScripting language. I tried using some examples from the TBScript pdf using notepad++ but all that happens is a command window opens and closes almost immediately.
I feel an idiot for not seeing it and I know it’s something simple I’m missing or doing wrong so can anyone tell me how to actually write and test a TBScript please.
I'm missing Something Simple
-
- Posts: 1682
- Joined: Fri Aug 12, 2011 12:51 am
Re: I'm missing Something Simple
Normally, you would either run the script directly from the TBOSDT prompt or setup the script to not exit until you can review the output.
To run directly from TBOSDT, start tbosdtw.exe (or tbosdtw64.exe), change to the directory with the script (or specify the complete path with the run command), and then use the run command.
For example: run mytestscript.tbs
Since the TBOSDT command prompt window is open the output will remain on the screen.
Here's a short example waiting for a keypress before exiting. This could be run directly from Explorer and the window will remain open until a key is pressed.
Keep in mind that when testing there will likely be errors so you'd probably want to run from the TBOSDT command prompt window so you can see what they are.
To run directly from TBOSDT, start tbosdtw.exe (or tbosdtw64.exe), change to the directory with the script (or specify the complete path with the run command), and then use the run command.
For example: run mytestscript.tbs
Since the TBOSDT command prompt window is open the output will remain on the screen.
Here's a short example waiting for a keypress before exiting. This could be run directly from Explorer and the window will remain open until a key is pressed.
Code: Select all
sub main()
printl("This a test script.")
v = 1024
s = "text"
printl("Value of v: ", v)
printl("Value of s: ", s)
ch = getkey() // wait for keypress
end sub
Re: I'm missing Something Simple
Thank You, that was the simple step I was not seeing.