QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Tommy_81 on October 14, 2020, 05:07:11 am
-
Hi,
I compiled and created the exe file for my START.BAS file. Inside the START.BAS file I have this instruction to call another BAS:
The START.BAS, START.EXE, INPUT.BAS files are all in the same folder (C:\QB45\). Running the EXE file (windows10, administrator privilege) I get error 53 (file not found). The strange thing is that I have this error only for the RUN statement, while OPEN finds the files correctly in the same path.
I also tried this but the problem remains:
or...
Do you have any ideas? Thank you.
-
small update.... I tried with the old QBasic compiler (with DosBox) at 16bit and using this:
and everything works! Is it a qb64 bug?
thanks
-
Not a bug. QB64 is a compiler, not an interpreter. You make stand alone EXE files with it, rather than running them inside the IDE.
Due to this change, you can't use RUN with *.BAS files in QB64, as your compiled program wouldn't have a clue what the heck to do with that BAS format. Instead, compile "INPUT.BAS" to it's executable, and then you should be able to either RUN, or SHELL out to "INPUT.EXE".
-
Preferably either (i) group all your code in a single module so you don't need two executables or (ii) compile as Steve said and use SHELL instead of RUN.
-
so the steps are as follows:
- create the EXE of the INPUT.BAS file
- use the SHELL statement instead of the RUN to call INPUT.EXE
It's correct. Sorry but I'm a novice with the basic.
Thanks
-
Once compiled either way works, I think, though not so sure about RUN.
Welcome to forum Tommy_81, had you thought about Tommy_gun? ;-))
It's funny what you bring up here I was just thinking about here:
https://www.qb64.org/forum/index.php?topic=3126.msg123984#msg123984
-
Thanks guy!
i did some tests and it works both run and shell
or The problem now is another, START.EXE calls INPUT.EXE which in turn calls START.EXE (there are no parameter passes, just calls between them). Unfortunately, INPUT remains open in its window, how can I close it when INPUT.EXE calls START.EXE?
I like Tommy-gun :-)
-
In your input program, set it up similar to this:
SHELL _DONTWAIT “Start.exe”
SYSTEM