Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting Focus between console and terminal
#1
I have written a program for Linux terminal commands with a menu.  Problem I have is how to set the focus from console to the terminal. Is is possible to do with the Linux version of QB64pe? Thanks ahead of time.
Reply
#2
Are you using `$Console:Only`? If I understand what you're describing correctly, you probably don't want the extra window at all and simply want to display everything in the original terminal the program is started from.

If that's not what you're talking about then I'd need to see a bit of your code or more explanation of what the program is doing.
Reply
#3
(08-31-2024, 10:33 PM)DSMan195276 Wrote: Are you using `$Console:Only`? If I understand what you're describing correctly, you probably don't want the extra window at all and simply want to display everything in the original terminal the program is started from.

If that's not what you're talking about then I'd need to see a bit of your code or more explanation of what the program is doing.

The main problem with Linux is that the console does not work like it does in Windows.  In order to run terminal commands with Linux is to open the program using the terminal.  This is an age old problem with QB64 does not exits under Windows.  When you run the program from the terminal you can pass the commands from any QB64 window to the terminal.  Problem is if it's run with a menu then the window has focus.  If something needs to be entered in the terminal you have to click the terminal to do so. Same goes with the program window. What I want is to set the focus without having to click on each every time. Other then that the two work well together.
Reply
#4
(08-31-2024, 11:46 PM)cage Wrote: When you run the program from the terminal you can pass the commands from any QB64 window to the terminal.  Problem is if it's run with a menu then the window has focus.  If something needs to be entered in the terminal you have to click the terminal to do so. Same goes with the program window. What I want is to set the focus without having to click on each every time. Other then that the two work well together.
Can you clarify - are you talking about when running a compiled program from the terminal vs. system menu, or running the QB64 IDE itself? The part I'm not following is why you need to enter anything into _both_ the original terminal and the program window. Maybe you're just saying that when you run a program via the IDE the program does not have focus when it starts?

It might be easiest to provide a couple screenshot showing how you're using QB64 , there's a lot of ways you can use it.
Reply
#5
No I am not running it from the IDE. Wouldn't work at all in the IDE.  Yes I am running a compiled program from the terminal. The idea to run the program from the terminal was determined by the guy who wrote INFORM. I don't remember his name but he posted a how to a long time ago on how to use the terminal with QB64 Linux. It works, no problem by his way, and had to be run that way in order to use the terminal with Linux. This has been a problem for many years that has never been addressed. By using the shell command I can make the terminal run the commands. If only running one command there is no problem although by adding a menu to my main program I have to shift focus between the main window and the terminal window manually.  I have another programming language that has a SetFocus command, which allows me to set the focus between two windows. Would be nice if QB64 and a meta command that would do the same.  I tried to post a picture of what I am doing but it crops half of the picture. I know that I can output the results to a file but that's not what I prefer to do.  Guess I will have to use a bash scrip to accomplish what I wanted to do. Thanks for replying.
Reply




Users browsing this thread: 5 Guest(s)