|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Shell||MBS Util Plugin||19.2||Yes||Yes||Yes||Yes||No|
Dim s As New ShellMBS
Dim output As String = s.ReadOutput
Dim errors As String = s.ReadError
Break // see in debugger
MsgBox "whoami: "+output
Via input stream, we can send data to the process.
And via output and error streams, we can read data coming back.
While this class does the same as Shell class in Xojo, we have the possibility to add more in the future.
For now you can benefit from an alternative implementation with stderr and stdout as two streams. Also we feature terminate methods to kill the child process.
See also WindowsProcessMBS and WindowsShellExecuteMBS (Windows only), ConsoleExecuteMBS and NSTaskMBS (Mac only).
- 2 events
- 14 properties
- property ApplicationName as String
- property AvailableBytesError as Integer
- property AvailableBytesOutput as Integer
- property CurrentDirectory as String
- property Domain as String
- property Environment as Dictionary
- property ErrorCode as Integer
- property Executable as String
- property IsRunning as Boolean
- property Password as String
- property PID as Integer
- property ProcessHandle as Integer
- property ThreadHandle as Integer
- property Username as String
- 14 methods
- method Arguments as String()
- method CloseInput
- method CloseStreams
- method Constructor
- method Destructor
- method Execute(Executable as String)
- method ExitCode as Integer
- method Poll
- method ReadError as String
- method ReadOutput as String
- method SetArguments(arguments() as String)
- method Terminate(WinExitCode as Integer = 255) as boolean
- method Wait(TimeOut as double = 30.0)
- method WriteInput(data as string) as Integer
This class has no sub classes.
Some examples which use this class:
- MBS Xojo Plugins, version 20.1pr1
- MBS Xojo Plugins, version 19.5pr1
- MBS Xojo Plugins in version 19.2
- MBS Xojo Plugins, version 19.2pr6
The items on this page are in the following plugins: MBS Util Plugin.
MBS Xojo tutorial videos