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.
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
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).

Feedback, Comments & Corrections

This class has no sub classes.

Some examples using this class:

Blog Entries

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

SHA512MBS   -   SignalHandlerMBS

The biggest plugin in space...

MBS Xojo blog

Start Chat