Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 odd behavior when Windows Terminal is set to default terminal app
#11
(10-01-2025, 05:46 PM)SMcNeill Wrote: Simple way to think of the differences in the two:

SHELL "cmd /c qb65pe.exe"
SHELL "powershell -run qb64pe.exe"

Two different terminals launching the program, and with different interfaces for each.  Similar, but distinct in the closing behavior.  Console will run and close, Terminal will run and wait for execution to finish, then close.
Okay, so how does this react to the PowerShell settings fof Terminal:

$Console:Only
_Dest _Console
$ScreenHide

I use this in quite a few QB64pe programs, when it's helpful to be able to scroll way back.

And, how would you run .bat or .cmd scripts? When I tried, they did not work.
Reply
#12
Quote:Okay, so how does this react to the PowerShell settings fof Terminal:

$Console:Only
_Dest _Console
$ScreenHide

I just checked to make certain I wouldn't tell you something wrong.  Smile

The above will open the TERMINAL (if that's your default setting), and since it's $CONSOLE:ONLY, it uses the existing terminal which appears at startup. 

You don't have it make a terminal, then start QB64PE, then QB64PE start a second terminal.

It simply opens the terminal and then assigns that window to QB64 for input/output.

Quote:And, how would you run .bat or .cmd scripts? When I tried, they did not work.

SHELL "cmd /c my_bat.bat"    <-- The easiest way.  Specify that you're shelling to a command window and not a terminal.  That's really all there is to it, but if you expect to keep using that .bat file in the future, you might want to look into what it'd take to swap over to powershell type commands and make it a *.ps script instead.

I really do think that someday down the road (and it may not be for 10 years from now, but *someday*), Windows will drop Console completely.  wmic is gone already.  Other tools are slowly being depreciated that people don't notice... until they do.  I imagine they'll go they same path the did with Explorer and Edge:

Explorer is in all OSes.
Explorer and Edge are both on the OS.
Edge is on the OS and Explorer becomes a download feature.
Edge is standard and Explorer is no longer supported.

The Terminal/Console thing seems to be following the same path of implementation.
Reply
#13
The whole thing seems to be organized quite differently under Win 11 than under Win 10. I have also installed the Terminal alongside Powershell, but I haven't encountered any of the problems described.
Reply
#14
Thanks, Steve! I'll save your post and try everything out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Latest version of QB64PE or QB64 compatible with Windows XP (32-bit)? madscijr 14 1,975 09-30-2025, 08:10 AM
Last Post: hsiangch_ong
  people using an ai agent, can it translate this TCL app to QB64PE? madscijr 2 540 07-10-2025, 07:15 PM
Last Post: madscijr
  Linux: terminal output Parkland 4 822 06-08-2025, 04:00 PM
Last Post: DSMan195276
  Bothersome Behavior Pwillard 4 763 05-19-2025, 03:59 PM
Last Post: Pwillard
  What's the default font? madscijr 5 1,048 03-01-2025, 07:46 PM
Last Post: Dark

Forum Jump:


Users browsing this thread: 1 Guest(s)