Posts: 2,771
Threads: 96
Joined: Oct 2003
Well, say you have a large collection of files that require the standard Qb library. What I do, is I drag the files from the folder onto the QB icon on my desktop. Works fine, expect when the program needs to use the standard Qb lib. Then I have to load QB with the Lib, and find the file through there. that may take a while, as I have deep directorys is some recesses of my QB folders. So I thought of this last night:
Code:
SHELL "D:\qb45\qb.exe /l qb /ah " + COMMAND$
Just compile this with the right directory, and hey presto! You can drag a file onto it and it will also load the QB lib! Works with any other Library as well. But you may want to change the "Working directory" in the EXE's properties to your main QB folder. This is much more convienient. The only catch is that it reduces the free memory by about 7Kbs or so, down to about 21-22Kbs.
Posts: 3,522
Threads: 189
Joined: Dec 2003
My bat file, for developing Novix:
Code:
..\..\QBx BIN\NVX25.MAK /Ah /Es /L LIB\NOVIX
Folder structure:
QBasic71\FosDev\Novix25\BIN\
Novix bas files in the BIN folder, and QBX.EXE in the QBasic71 folder.
Default folder when in QB, will be the same as the BAT file is in, namely:
QBasic71\FosDev\Novix25\
And the bat file takes up less memory then the exe.
Posts: 2,771
Threads: 96
Joined: Oct 2003
Yes, I use BATs for my current projects too, but when you have several files that require a library, you dont want to have to make a bat for each of them just for easy access, do you?
Posts: 6,419
Threads: 74
Joined: Mar 2002
You can drag and drop stuff over batch files...
Code:
E:\COMPILA\QB45\QB.EXE %1 /L /AH
for example.
Posts: 2,771
Threads: 96
Joined: Oct 2003
When I drag and drop over a batch file, it just gives me an error and says "C:\WINDOWS\DESKTOP" and then closes.
is that what %1 does? Is that like the COMMAND$ variable?
Posts: 3,522
Threads: 189
Joined: Dec 2003
%1 is the first variable on the commandline after the bat file:
batfile %1 %2 %3 %4 %5 %6 [aso]
So:
batfile hi there you little thing
Would result in:
%1=hi
%2=there
%3=you
%4=little
%5=thing
So:
Would write out:
you
On the screen.
So, it's somewhat like command$, imo it's even better as you can get different parts of the commandline easily.
Posts: 1,688
Threads: 119
Joined: Jun 2003
personally, i have a bunch of libs in the same folder as qbasic 4.5. then i have a whole bunch of bats. (shortcuts need the f: or E:, which is bad for a flashdrive when the drive changes names a whole bunch) then each bat is named something like rellib 4.5, ugl 4.5, dqb 4.5, and each bat loads qbasic with that lib.
Jumping Jahoolipers!
Posts: 6,419
Threads: 74
Joined: Mar 2002
Personally I use the freakin' DOS box for DOS programs
And y'all should do that.
Posts: 1,845
Threads: 44
Joined: Aug 2002
barok: I've got a nice directory structure...
nath: Agreed, I use it as well (W2K).