Console text to Application

New to Gambas? Post your questions here. No question is too silly or too simple.
Post Reply
mikejp56
Posts: 17
Joined: Tuesday 28th January 2020 1:19pm

Console text to Application

Post by mikejp56 » Sunday 22nd May 2022 7:36pm

Hi All,
I am no doubt a beginner when it comes to programming. I have a small application that places some text in the console. I would like to place this text into a textbox or textarea, or some other item in the application. I have attached a screenshot of the IDE. In this case I would like to display the text "yt-dlp is up to date (22.05.18)" in the app.
Please explain to me how to do this.
Thanks and regards.
mikejp56
Screenshot from 2022-05-22 15-27-51.png
Screenshot from 2022-05-22 15-27-51.png (55.17 KiB) Viewed 202 times

vuott
Posts: 112
Joined: Wednesday 05th April 2017 6:07pm
Location: European Union

Re: Console text to Application

Post by vuott » Sunday 22nd May 2022 9:28pm

If the command, used with "Shell", immediately returns its result, then you have to use the TO keyword.

Example:
Public Sub Form_Open()

  Shell "ls" To TextArea1.Text

End
http://gambaswiki.org/wiki/lang/shell
I am a European.

Amare memorentes atque deflentes ad mortem silenter labimur.

mikejp56
Posts: 17
Joined: Tuesday 28th January 2020 1:19pm

Re: Console text to Application

Post by mikejp56 » Sunday 22nd May 2022 10:12pm

Hi vuott,
Thank you very much!
Regards,
mikejp56

Post Reply