1

I have a shell command that I am running in a RealBasic App, and until now I've just been reading the output, but it requires user input. Is there something I could use to embed something like a terminal or a console application that could run a command, show the output, and take the input, maybe in a widget looking like a text area, like many IDEs and code editors have?

Paul Lefebvre
  • 6,253
  • 3
  • 28
  • 36
None
  • 3,875
  • 7
  • 43
  • 67

2 Answers2

2

There is no pre-built control in RealStudio to accomplish this. However it's trivial to implement with a TextArea control and a Shell object set to Mode=2.

An example of this is included in the RealStudio Examples directory in your RealStudio install directory (by default on Windows, C:\Program Files\REAL Software\Real Studio\Examples\Shell\Interactive Shell.rbp.)

Andrew Lambert
  • 1,869
  • 1
  • 17
  • 31
1

Could you separate the output and input, or would this not make sense for your use case?

If you could, then you could simply use a TextArea to display the console app's output, just keep appending to the TextArea's text. Then use a TextField for single line input underneath the TextArea, or whatever else makes sense for entering the params you need to send to the console app.

Then you can use a button (or catch [RETURN] key up in TextField) to grab the input and pass on to the console app.

ianmjones
  • 3,395
  • 1
  • 25
  • 26