MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

ConsoleExecuteMBS(path as string, arguments() as string, environment() as string) as integer
global method, Files, MBS Util Plugin (ConsoleLaunch), Console safe, Plugin version: 7.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Works, Feedback.

Function: Executes a new application.
Example:
// launch an app using open

const sShellPath="/usr/bin/open"

dim a(1) as string
dim e(-1) as string

a(0)="open" // must be the application name
a(1)="/Applications/TextEdit.app" // first parameter

print str(ConsoleExecuteMBS(sShellPath,a,e))

// Launch app binary directly:

dim aa(1) as string
dim ee(-1) as string

dim f as FolderItem

f=GetFolderItem("test.app").Child("Contents").Child("MacOS").Child("test")

aa(0)=f.ShellPath

print str(ConsoleExecuteMBS(f.ShellPath,aa,ee))

Notes:
Launch GUI tools on Mac OS X using /bin/open.
Returned valus is the PID of the new process.
If the execution fails you still get a PID, but this process is terminated in a few milliseconds.

arguments must have at least one member.

Some examples using this method:

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