Page 1 of 1

Copy/Paste printed output

Posted: Wed Oct 16, 2024 8:02 pm
by davey110
When I run a program that prints text output, I can normally Copy/Paste this output to another program or app after the program ends.
I have written a program that is mostly GRAPHICS mode, but also prints some text on the TEXT screen. But this text will not Copy/Paste. "Select" text does not even show up. I have ensured that the program is in TEXT mode while the text is being output, as well as just before it ends. Is there something in Graphics mode that blocks the Copy/Paste function? Is there a way around it? I have tried running other text only programs in Graphics mode and switching back to Text, then Copy/Paste works fine. I have SB v6.9 on an iPad Mini.

Re: Copy/Paste printed output

Posted: Thu Oct 17, 2024 8:08 am
by Mr. Kibernetik
I do not understand the problem.
The text printed by PRINT is selectable for copying after TEXT mode is switched into.

Re: Copy/Paste printed output

Posted: Thu Oct 17, 2024 3:05 pm
by davey110
It works fine in other programs, but for this particular program it won't work. I just wondered if sliders or buttons in Graphics mode could interfere with it somehow. I don't understand it either.
Thank you.

Re: Copy/Paste printed output

Posted: Thu Oct 17, 2024 5:01 pm
by davey110
I REMed out the buttons and sliders, and the Copy/Paste works OK. By REMing out various parts of the program, I narrowed it down to Sliders or Buttons. Creating either Sliders or Buttons disables the Copy/Paste ability, even it if it was not in GRAPHICS mode. Without either, it works fine.

Re: Copy/Paste printed output

Posted: Thu Oct 17, 2024 8:27 pm
by davey110
I have solved the problem by writing a small program to Read the Clipboard and Print the results from the main program.
The main program WRITEs the values to the Clipboard, and then RUNs the second program, which READs the values from the Clipboard and Prints them to the screen. The values on the screen will now Copy/Paste normally.

The paragraph in the Help file, (Input & Output section) clued me in to this solution. It's not too clumsy, since the 2nd program is run by the main one. If there is a more direct solution, I would appreciate hearing about it.

Re: Copy/Paste printed output

Posted: Fri Oct 18, 2024 12:27 pm
by Mr. Kibernetik
You can print values to file if you need a text copy of results.

Re: Copy/Paste printed output

Posted: Fri Oct 18, 2024 3:15 pm
by davey110
Thank you. That would also solve the problem.