thinBasic scripts can be invoked in many different ways:
- by a double click on Windows shell
- executed by a command inside a console window
- executed by another script or a scheduling application
- executed by a batch file (.Bat or .Cmd)
When you execute a script by double click on script file name, automatically the command passed to the operating system is
[code=dos]thinBasic.exe DoubleClickedScriptName.tBasic[/code]
so you have no way to pass other info to the script (command line parameters)
But when you execute in a not interactive way, you can pass other info to the script and get those info (called parameters) using OS module and few specific functions.
To have a look see \SampleScripts\OS\ directory.
You should find a Test.Bat file that executes OS_SampleCommandLine.tbasic script passing two parameters. Than look inside OS_SampleCommandLine.tbasic and see how to parse command line params.
Ciao
Eros
Bookmarks