How to select and copy the contents of the console
How to select and copy the contents of the console
Hello everyone.
You can copy the contents of the console to the clipboard, and then paste it into a txt file???
Thank you
You can copy the contents of the console to the clipboard, and then paste it into a txt file???
Thank you
-
- Posts: 490
- Joined: Sep 28, 2013 15:08
- Location: Germany
Re: How to select and copy the contents of the console
Yes, you can. Click on the console menu (upper left corner in the title bar of the console) and select "Edit" -> "Mark". Mark your selected text and select "Edit" -> "Copy". Then you have your selected text in the clipboard and can paste it into an editor. I hope I have used the right expressions, because I have a windows console in german language. The steps in german are "Bearbeiten" -> "Markieren" and "Bearbeiten" -> "Kopieren".
Re: How to select and copy the contents of the console
I usually just left-click & drag to select the text I want then to copy to clipboard simply right-click on the console window
subsequent right-click on the console window will paste the clipboard content to the console
subsequent right-click on the console window will paste the clipboard content to the console
Re: How to select and copy the contents of the console
But in the FreeBasic console I do not get any menu, that is, if I do a....Lothar Schirm wrote: ↑Jul 13, 2023 9:59 Yes, you can. Click on the console menu (upper left corner in the title bar of the console) and select "Edit" -> "Mark". Mark your selected text and select "Edit" -> "Copy". Then you have your selected text in the clipboard and can paste it into an editor. I hope I have used the right expressions, because I have a windows console in german language. The steps in german are "Bearbeiten" -> "Markieren" and "Bearbeiten" -> "Kopieren".
Print "hello"
Sleep
This prints it on a black screen, and it has no menus. Unless you refer to the other one that opens with...
Open Console
but I don't know how to send data to it.
Thank you
Re: How to select and copy the contents of the console
Thank you, I was able to enter the menu, pressing the icon of the system symbol.
Surely many years ago I had done it, but I did not remember. I was also able to change the source and buffer size, as I couldn't see the data at the beginning.
Surely many years ago I had done it, but I did not remember. I was also able to change the source and buffer size, as I couldn't see the data at the beginning.
-
- Posts: 490
- Joined: Sep 28, 2013 15:08
- Location: Germany
-
- Posts: 4690
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: How to select and copy the contents of the console
If you want to copy the whole console output to the clipboard then execute
followed by
Job done.
If you wish to copy selected text, then right-click on the Console's title bar and select 'Edit > Mark'.
Now select text with the mouse.
Then execute
Job done.
Code: Select all
Control + A
Code: Select all
Control + C
If you wish to copy selected text, then right-click on the Console's title bar and select 'Edit > Mark'.
Now select text with the mouse.
Then execute
Code: Select all
Control + C
Re: How to select and copy the contents of the console
On Linux consoles Ctrl+A/C/V do not work. Instead, they support the old (DOS) keys Ctrl+Ins (copy) and Shift+Ins (paste) whereby Ins is the Insert key.
Re: How to select and copy the contents of the console
You can redirect the console output in a shell. By default the output is send to STDOUT. Ie prints to the console (terminal), but
Code: Select all
echo Hallo
- executing sends the output to a new file named outfile.txt in the current folder, and
Code: Select all
echo Hallo > outfile.txt
- executing appends the output to an existing file named outfile.txt in the current folder (creating a new one if non-existent).
Code: Select all
echo Hallo >> outfile.txt
-
- Posts: 490
- Joined: Sep 28, 2013 15:08
- Location: Germany
Re: How to select and copy the contents of the console
If you want to copy text from the console using FreeBASIC, you can use the Screen-Function (https://www.freebasic.net/wiki/KeyPgScreenCons) to store the text from the console either line by line into an array of strings or to store the text into a single string (using line feed). You can then store the text into a text file.