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 »

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 1251 times
vuott
Posts: 262
Joined: Wednesday 5th April 2017 6:07pm
Location: European Union

Re: Console text to Application

Post by vuott »

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
Europaeus sum !

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 »

Hi vuott,
Thank you very much!
Regards,
mikejp56
Post Reply