Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Directories....
#11
Quote::o you really need all that code? ok then. are there any other ways of doing it? Libraries perchance? I am using FB, if that changes anything. Also, whats the best FBasic IDE as far as not crashling? I have FBIDE (by vongrondric) and it crashes freqently.
Thanks
You could try out FBIde 0.4 -released yesterday and I'm quite confident in it's stability
url]http://fbide.sourceforge.net/[/url]
Reply
#12
yep, i'll download it as soon as I get home. sourceforge was downl yesterday when i tried to download it. I try what chaos said as I am using fb. thanks for all your help. Smile
[Image: freebasic.png]
Reply
#13
Quote:Well, it cant be that hard. Here's what I'm talking about: I just downloaded Wetspot 2 and put it in a directory. I'm quite sure that its not the same directory it was programmed in. Yet, it can open all its files. How do i do this? Is that ASM code what it takes?
Like Cha0s said in his post right after yours, the Wetspot program just opens its files specifying a filename only (no path) which implies accessing them from the "default directory", which needs to be the directory where you put the package. If you created another directory called \WET2 and copied the Wetspot files into it, then changed directory to \WET2, the package would still run even though it's now in a different directory. Get it? This is standard procedure for most software packages.

You said: "I'm quite sure that its not the same directory it was programmed in." The thing is that the files were not programmed or hardcoded into any particular path, just the filenames, which accesses them from the "default directory".

However, lets say that you put the package into a directory called \WETSPOT. Then you change directory to \MAIN, which is now the default directory. Then you run the program by doing \WETSPOT\WETPROG.EXE. It will run the program, but it won't find its files because they are not in the default directory of \MAIN. To run the package correctly, you must do:
cd \WETSPOT ....... (which establishes the default directory.)
WETPROG.EXE

What else can I tell you.
*****
Reply
#14
yep, that makes it crystal clear, thanks. Big Grin

EDIT: There is a command in FB called EXEPATH that tells you the path of the .exe. I might just use that. 8)
[Image: freebasic.png]
Reply
#15
Quote:yep, that makes it crystal clear, thanks. Big Grin

EDIT: There is a command in FB called EXEPATH that tells you the path of the .exe. I might just use that. 8)

I still don't understand why you need to obtain the path of the exe. Why do you need it and what are you going to do with it?
*****
Reply
#16
:o I'M GOING TO KILL IT!!!!!!!!!!!!!

erm....

ahem....

I'm going to use it so i know where to get my outside data from....
[Image: freebasic.png]
Reply
#17
I just scaned through the thread, but...

You can just use relative paths.


Like this:

Let's say your file is called whatever.dat, and it's in the subdirectory called data...

Code:
OPEN "data/Whatever.dat" For blah as #bleh

Wink
Reply
#18
well, your scanner needs adjustment, thats been said already. thanks anyhow. Smile
[Image: freebasic.png]
Reply
#19
OK... :oops:

I'm confused too then. :lol:
Reply
#20
Quote::o I'M GOING TO KILL IT!!!!!!!!!!!!!

erm....

ahem....

I'm going to use it so i know where to get my outside data from....
But, where did you get the path to execute the exe in question? You can't execute a program that you don't know where it is located (the path).
You haven't made this point clear from the start. Please explain more.
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)