PDA

View Full Version : Question About ThinBASIC Command Prompt



Mark Pruitt
03-06-2005, 14:48
Hey Eros, I have a question about using ThinBASIC from the command prompt.

I prefer to do a lot of mundane things from the command prompt. I've been using ThinBASIC mostly that way. After entering something like, "C:\thinbasicC.exe ...", I've found that I need to type in the complete extension (.tbasic) to run a script.

As it is now, it seems ThinBASIC expects you to enter the entire extension before it will run a script. Do you think there would be any value to having it assume the operator is looking for a .tbasic script, so that you could enter something like the below and run a script?

"c:\thinbasicC script1" as opposed to "c:\thinbasicC script1.tBasic"

Have you tried adding ThinBASIC to the PATH directory, so you could do something like "script1.tbasic" and have a script run?

This is not necessarily a feature request. I'm more curious. I don't know how many like the command prompt as much as I do. Thanks.

Mark Pruitt
03-06-2005, 15:30
I put "C:\ThinBASIC" in my PATH directory, and added the ".tBasic" extension to my list of executable files. Now I can open a command prompt in any folder and type "thinbasicC script2.tbasic" and run a script. Pretty handy. I wish I'd thought of doing that earlier.

ErosOlmi
05-06-2005, 21:25
Hi Mark,

I'm just back from a little holiday.
Your request is ok. I will change thinBasic way to scan for script and change it.
I will send you again the whoole project. We have make some improve on the help file.

Another change we can do is the following.
thinBasic has 2 executable: thinBasic.exe for GUI application, thinBasicC.exe for Console and CGI applications.
When thinBasic.exe (GUI version) is executed it register .tBasic extension to be executed by thinBasic.exe, while thinBasicC.exe (Console and CGI) does not make any extension registration.
We can change thinBasicC.exe to register .tBasicC extension in order to be able to run the scripts just typing script name + extension.

In the meantime, if you have some special requests regarding your "mundane things" :wink: , let me know.

Regards
Eros

ErosOlmi
07-06-2005, 01:07
OK Mark,

I've made the following changes:
[list] thinBasic.exe register .tBasic extension as its own
thinBasicC.exe register .tBasicC extension as its own
no .tBasic extension needed anymore for script name on command line
if no directory specified into script name, script is searched in the current directory
first, script is searched as typed. If no script found and no extension was specified, a .tBasic extension is added and script searched again. If again no script is found, a .tBasicc extension is added and script searched again[/list:u]

Let me know if you like it.
Regards
Eros