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 to use the cl$()?

Author
Message
Shark
20
Years of Service
User Offline
Joined: 7th May 2006
Location: The world
Posted: 30th Jun 2006 23:51
Well im making a file converter and I want to be able to put a file over the executable and it convert it.

My site: http://awesomegames.galekus.com/home/
Forum: http://awesomegames.galekus.com/forum
Shark
20
Years of Service
User Offline
Joined: 7th May 2006
Location: The world
Posted: 1st Jul 2006 04:30
I really need to know this!

My site: http://awesomegames.galekus.com/home/
Forum: http://awesomegames.galekus.com/forum
master programmer
21
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 1st Jul 2006 05:22
What kind of file? Image, Video, Audio? What file extensions? .mp3, .wav, .asf, .avi, .mov, .jpg, .bmp, .gif.

Tells us a little more so we can help.

Shark
20
Years of Service
User Offline
Joined: 7th May 2006
Location: The world
Posted: 1st Jul 2006 06:55 Edited at: 1st Jul 2006 07:06
.3ds to .x model. Also I need to know how to take out quotation marks out of a string.

My site: http://awesomegames.galekus.com/home/
Forum: http://awesomegames.galekus.com/forum
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 1st Jul 2006 10:20 Edited at: 1st Jul 2006 10:26
cl$() is used to get a commandline from a string.

For example:
if you use in another program: execute file filename$, commandline$, directory$, then the cl$() will return the commandline passed with this command.

Another example would be the "open with ..." (right click on a file > open with), or dragging your file onto the exe (same effect), then the commandline will be the URL of the selected file.

To get the name without quotation marks, it is enough to use

(it could be comprimised into one line, but it would make it a bit unreadable)

So (I saw your program on the forum), if you need to add this: Start by checking wether the command line contains something or nothing(""), if it contains something, see if the file exist, and if it exist, open it.

I hope this helps.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
SimSmall
21
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 1st Jul 2006 13:21
and for getting rid of quotation marks that are in the middle of a string:



I don't know if this is beneficial to you currently, but you may find it useful in further stages of development.

Login to post a reply

Server time is: 2026-07-07 00:31:55
Your offset time is: 2026-07-07 00:31:55