Platforms to show: All Mac Windows Linux Cross-Platform

ShellMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Shell MBS Util Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: The class in MBS Plugins to run executables.
Example:
Dim s As New ShellMBS

s.Execute "/usr/bin/whoami"
s.Wait 5

Dim output As String = s.ReadOutput
Dim errors As String = s.ReadError

Break // see in debugger

MsgBox "whoami: "+output
Notes:
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, WindowsShellExecuteAsAdminMBS and WindowsShellExecuteMBS (Windows only), ConsoleExecuteMBS and NSTaskMBS (Mac only).

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Videos


The items on this page are in the following plugins: MBS Util Plugin.


SharingPanelMBS   -   SignalHandlerMBS


💬 Ask a question or report a problem
The biggest plugin in space...