Aug 11, 2008, 02:51 AM | |
Help with BASIC
Hey there;
I've recently made some basic er... BASIC programs for fiddling around with the Jazz Jackrabbit 1 graphics The only problem seems to be that well, they're a bit hard to use if you're not totally DOS immersed like I am. They're all command line interfaces, and a bit picky at that. So what I was wondering was, is there anyone here who knows more BASIC than me (That's not hard) that knows how to make opening or accessing files a little more easy than having to type out the whole name? (People really don't like doing this) Or, if you have any tips for making my programs easier to use, they can be got here: http://www.jazz2online.com/J2Ov2/dow...p?levelID=5147
__________________
![]() nonne amicus certus in re incerta cernitur? /)_/)
(^.^) ((")(") |
Aug 11, 2008, 04:26 AM | |
I am an experienced BASIC programmer. The problem is, that I've never really found any other solution to opening files easier than typing the path and file name. However, one suggestion is (albeit not really elegant):
Tell the user that the files he/she wants to work with must be in the directory of the program. Then, you can make him/her write his/her files in a file with a listing of all the files, which is read by the program when choosing a file. In Microsoft QBasic, reading that file would be like this: Code:
OPEN "Filelist.txt" FOR INPUT AS #1 DO WHILE NOT EOF(1) Counter = Counter + 1 INPUT #1, FileName$(Counter) PRINT FileName$(Counter) LOOP CLOSE #1 You can also sort the files by name, but I'm not going to deal with this at the moment. Note that I have only tested these techniques on Microsoft QBasic. Your BASIC interpreter/compiler may use different commands for dealing with files. Hope this helps!
__________________
Jazz 2 Utilities Last edited by HorvatM; Aug 11, 2008 at 04:28 AM. Reason: A few errors. |
Aug 11, 2008, 12:04 PM | |
I used to program in Quick Basic on Commodore64, but later on I've done numerous programs in Visual Basic 6. Recently I've stopped VB6 altogether to focus on x86 assembly, C++ and linux scripting.
__________________
<a href="http://nmap.org/"><img border="0" alt="Nmap Security Scanner" src="http://images.insecure.org/nmap/images/prop/nmap_bnr_matrix_pfos.gif"/></a> |
Aug 16, 2008, 10:59 PM | |
I see. Well, that is a pity then. I can only hope that someone who knows better language than me will work up the gumption to make replacements for my rudimentary programs. (Go go OpenJazz)
__________________
![]() nonne amicus certus in re incerta cernitur? /)_/)
(^.^) ((")(") |
Aug 17, 2008, 08:12 AM | |
Which BASIC variant are you using?
In Visual Basic 6, you can either use the Common Dialogs Control (needs a Form) or the dlgobjs.dll that I think is in the Package and Deployment Wizard folder (you may need to register it with regsvr32.exe) to display the standard Windows file open dialog. Obviously you'll have to include whichever one you use with your program, and either an installer or instructions on registering it. If you're using QuickBASIC/QB, then you'll have to write your own console-based file browser. You could also read the filename in from the COMMAND$ function as part of the command-line arguments - this will let the user drag and drop the file on to your program. I've not downloaded and tried your programs yet, as I don't have a JJ1 variant to hand (got the Xmas versions somewhere), so do say if I'm barking up the wrong tree here. |
![]() |
«
Previous Thread
|
Next Thread
»
Thread Tools | |
|
|
All times are GMT -8. The time now is 05:54 PM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.