QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Timbergetter on October 10, 2020, 06:49:25 pm

Title: SHELL observation
Post by: Timbergetter on October 10, 2020, 06:49:25 pm
If I run the following 5 commands I get a directory list on the output screen as expected:
Code: QB64: [Select]
  1.    OPEN "runme.bat" FOR OUTPUT AS #1
  2.    PRINT #1, "dir"
  3.    PRINT #1, "pause"
  4.    CLOSE
  5.    SHELL "runme"

However if I run:

Code: QB64: [Select]
  1.    SHELL “dir”

by itself I see the directory listing for a few milliseconds and then a blank output screen.

In QuickBasic 4.5 the SHELL “dir” command does produce a directory listing to the output screen and it remains there.

I am keen to know how to interpret what I am seeing here.
Title: Re: SHELL observation
Post by: Pete on October 10, 2020, 09:08:14 pm
Code: QB64: [Select]
Title: Re: SHELL observation
Post by: Timbergetter on October 10, 2020, 10:25:25 pm
Thank you Pete, that’s great feedback.  I see now the added flexibility of the console commands.  So am I right in thinking that shelling to an internal dos command (dir) activates the console but then issues a  _CONSOLE OFF by default?  Whereas shelling to a dos batch command activates the console and leaves  _CONSOLE ON by default.
Title: Re: SHELL observation
Post by: Pete on October 10, 2020, 11:53:33 pm
You may be right
I may be crazy...

Code: QB64: [Select]

Using START will leave the console open when the QB64 window, hidden with _SCREENHIDE, closes.

Pete
Title: Re: SHELL observation
Post by: krovit on October 12, 2020, 02:43:32 am
What timing!
I had just now the same problem...

At QB, it seems to me that the management of the SHELL was different. Maybe it was simpler and more direct.