QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Tommy_81 on October 14, 2020, 05:07:11 am

Title: error 53 file not found in RUN command
Post 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:
Code: QB64: [Select]
  1. RUN "INPUT.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:
Code: QB64: [Select]
  1. RUN "C:\QB45\INPUT.BAS"
or...
Code: QB64: [Select]
  1. RUN "..INPUT.BAS"

Do you have any ideas? Thank you.
Title: Re: error 53 file not found in RUN command
Post by: Tommy_81 on October 14, 2020, 10:15:08 am
small update.... I tried with the old QBasic compiler (with DosBox) at 16bit and using this:
Code: QB64: [Select]
  1. RUN "C:\QB45\INPUT.BAS"
and everything works! Is it a qb64 bug?
thanks
Title: Re: error 53 file not found in RUN command
Post by: SMcNeill on October 14, 2020, 11:10:38 am
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".
Title: Re: error 53 file not found in RUN command
Post by: FellippeHeitor on October 14, 2020, 12:38:46 pm
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.
Title: Re: error 53 file not found in RUN command
Post by: Tommy_81 on October 14, 2020, 01:04:32 pm
so the steps are as follows:It's correct. Sorry but I'm a novice with the basic.
Thanks
Title: Re: error 53 file not found in RUN command
Post by: bplus on October 14, 2020, 01:42:20 pm
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
Title: Re: error 53 file not found in RUN command
Post by: Tommy_81 on October 15, 2020, 04:16:37 am
Thanks guy!

i did some tests and it works both run and shell
Code: QB64: [Select]
  1. RUN "INPUT.EXE"
or
Code: QB64: [Select]
  1. SHELL "INPUT.EXE"
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 :-)
Title: Re: error 53 file not found in RUN command
Post by: SMcNeill on October 15, 2020, 08:53:37 am
In your input program, set it up similar to this:

SHELL _DONTWAIT “Start.exe”
SYSTEM