Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / How would I make a browser?

Author
Message
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Jul 2005 04:03
I've got a 'Load' so I can load up .wav files, the only problem is..I don't know how to load it, like when you go to any normal prgram, it has an 'Open' button, and then you can browse though your computer to find a file.. how would I do this?

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Jul 2005 04:40
Well, I created a browser once... Here is the code:



I'm not asking you to copy it, but you're free to use it as a reference...

Immunity and Annihalation makes Immunihalation...
AndLabs
20
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 20th Jul 2005 05:47
If you were coding in DarkBASIC Pro you would use Rob K's Blue GUI. But for DarkBASIC, use the one conveniently made by and found in Frederic Cordier's Magic Windows.

For the Software You Want, AMPERSAND LABORATORIES is the place! [URL=http://www.andlabs.com/]
[/URL]
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Jul 2005 07:16
wow, thats cool, its like a mini wondows..

but all i really wanted to know is how to be able to go to the parent folder, then go to the next one, and be albe to select .wav files
I can't seem to understand your code since it doesnt have rem statements.. could you possibly put a piece of code together just showing how to go from one folder to another... thanks alot

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Jul 2005 19:13


and the subfunction:



BTW, It has remstatements. But it uses ` instead of rem.

Immunity and Annihalation makes Immunihalation...
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Jul 2005 19:20
Quote: "BTW, It has remstatements. But it uses ` instead of rem.
"

lol, I'm not THAT bad at it
It's just that the other one had too much code for me to look through, especially when I don't know what half of the directory commands mean.

Thanks alot for the new code

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Jul 2005 19:26
It's just a piece of code extracted from my big one.

I forgot a short code to show you:
[/code]
`search files
find first
find next
name$=get file name$()

`"previous"-button
if button(10,y#,"previous")>0 and hold=0 then gosub open : hold=1

`file buttons
for f=1 to checklist quantity()-2
find next
name$=get file name$()
if button(10,y#+f*20,name$)>0 and hold=0 then gosub open : hold=1
next f
[code]

This one displays all files in the directory.
(Don't forget to use perform checklist for files before the main loop)

Immunity and Annihalation makes Immunihalation...
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Jul 2005 22:03
it works perfect! thanks alot!

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Jul 2005 22:10
No problem.
Good luck

Immunity and Annihalation makes Immunihalation...
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 24th Jul 2005 05:32
I had the same problem a while back. I was just about to make a file browser, but I decided to ask first and someone helped me out:

http://forum.thegamecreators.com/?m=forum_view&t=48523&b=10

Its uses the actual windows browser, so no need to revent the wheel.

Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Jul 2005 08:08
wow, thats sooo cool, thanks alot!

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 25th Jul 2005 17:39
I can't use DLL's so I had to search for an alternative way...

Immunity and Annihalation makes Immunihalation...
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 25th Jul 2005 19:10
your way works just the same on my opinion, its just that you can't scroll down which means that you can only see a certain amount of files. Other than that its really cool cos you've got a picture veiwer and a little music player thing and stuff

Your signature has been erased by a mod because it's larger than 600x120...
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 26th Jul 2005 20:04
Press up/down key to scroll.

I could've add scrolling with the mousewheel. But I didn't know how to use the mousemovez() command. It's a bit different then mousemovex() and mousemovey().

Immunity and Annihalation makes Immunihalation...
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 30th Jul 2005 20:42
Hey, nice file browser!!

Syntax Error - Learn to type, you fool!

Login to post a reply

Server time is: 2025-05-22 13:14:55
Your offset time is: 2025-05-22 13:14:55