Platforms to show: All Mac Windows Linux Cross-Platform
Back to ProcessMBS class.
ProcessMBS.Bundle as folderitem
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 4.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Maybe nil if not available.
Returns on Mac OS X the path to the main bundle of the process.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 7.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Maybe "" if not available.
Returns on Mac OS X the identifier to the main bundle of the process.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This should always be your Xojo application.
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Some examples using this method:
ProcessMBS.GetNextProcess as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true if successfull.
Some examples using this method:
ProcessMBS.GetProcess(serial as memoryblock)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Some examples using this method:
ProcessMBS.KillProcess as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 2.7 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns -1 if function is not available. Else returns a Mac OS error code where 0 equals "no error".
Sets the lasterror property.
Lasterror codes on Windows:
0 - failed
1 - normal exit
2 - forced exit
If you kill the main process of a task, this can kill the sub processes, too.
See also:
- KillProcess(ProcessID as Integer, timeout as Integer) as Integer
- KillProcess(timeoutms as Integer) as Integer
Some examples using this method:
ProcessMBS.KillProcess(timeoutms as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 4.2 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns -1 if function is not available. Else returns a Mac OS error code where 0 equals "no error".
Sets the lasterror property.
Lasterror codes on Windows:
0 - failed
1 - normal exit
2 - forced exit
The timeout is in milliseconds. If you don't specify a timeout, 1000 ms are used.
If you kill the main process of a task, this can kill the sub processes, too.
See also:
ProcessMBS.MacProcessSerial as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 2.7 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
On Mac OS every process as its own unique ID. (If you launch one application two times, they may have everything equal except the process serial.)
The serial itself is a 8byte long memoryblock (two integer).
Returns nil on any error.
Some examples using this method:
ProcessMBS.Priority as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Process | MBS Util Plugin | 10.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
20 (least) to -20 (max). Setting the value may be limited due to permissions.
(Read and Write computed property)
See also:
ProcessMBS.ProcessInformationCFDictionary as object
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 3.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Only available on Mac OS X 10.2 or newer.
(And in Mac OS X 10.2 is a bug which may lead into a crash by using this function. Fixed in Mac OS X 10.3)
The function returns a CFDictionaryMBS, but to avoid plugin dependencies, the function is declared as Object, so RB 4.5 don't crash when an application uses the process plugin and dosn't use the CF Plugin.
Result:
An immutable CFDictionary containing these keys and their values. Keys marked with an '*' are optional. Over time more keys may be added.
Key Name | Type |
"PSN" | CFNumber, kCFNumberLongLongType |
"Flavor" | CFNumber, kCFNumberSInt32 |
"Attributes" | CFNumber, kCFNumberSInt32 |
"ParentPSN" | CFNumber, kCFNumberLongLong |
"FileType" | CFString, file type |
"FileCreator" | CFString, file creator |
"pid" | CFNumber, kCFNumberLongType |
"LSBackgroundOnly" | CFBoolean |
"LSUIElement" | CFBoolean |
"IsHiddenAttr" | CFBoolean |
"IsCheckedInAttr" | CFBoolean |
"RequiresClassic" | CFBoolean |
"RequiresCarbon" | CFBoolean |
"LSUserQuitOnly" | CFBoolean |
"LSUIPresentationMode" | CFNumber, kCFNumberShortType |
"BundlePath" | CFString |
kIOBundleExecutableKey | CFString |
kIOBundleNameKey | CFString |
kIOBundleIdentifierKey | CFString |
Some examples using this method:
ProcessMBS.QuitProcess as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 3.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns -1 if function is not available. Else returns a Mac OS error code where 0 equals "no error".
Sets the lasterror property.
Some examples using this method:
ProcessMBS.SameAs(other as ProcessMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
ProcessMBS.SetFrontProcessWithOptions(options as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
If you pass 0 in the options parameter, the process is activated and all process windows are brought forward.
If you pass kSetFrontProcessFrontWindowOnly (value 1), the process is activated and the frontmost non-floating window is brought forward. (Mac OS X only)
ProcessMBS.SetServiceMode(ismode as boolean) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 2.7 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Works only on Windows 95, 98 and ME.
Some examples using this method:
ProcessMBS.TransformProcessType(mode as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 15.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Given a psn for an application, this call transforms that application into the given type. Foreground applications have a menu bar and appear in the Dock. Background applications do not appear in the Dock, do not have a menu bar (and should not have windows or other user interface). UIElement applications do not have a menu bar, do not appear in the dock, but may in limited circumstances present windows and user interface. If a foreground application is frontmost when transformed into a background application, it is first hidden and another application is made frontmost. A UIElement or background-only application which is transformed into a foreground application is not brought to the front (use SetFrontProcess() after the transform if this is required) nor will it be shown if it is hidden (even if hidden automatically by being transformed into a background-only application), so the caller should use ShowHideProcess() to show the application after it is transformed into a foreground application. Applications can only transform themselves; this call cannot change the type of another application.
Returns error code (0 for success).
ProcessMBS.TransformToForegroundApplication as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns a Mac OS error code. Returns -1 if the function is not available. You need to select a process first with Get*Process functions.
Requires Mac OS X 10.3.
You can use this call to transform a background-only application into a foreground application. A foreground application appears in the Dock (and in the Force Quit dialog) and contains a menu bar. This function does not cause the application to be brought to the front; you must set FrontProcess=true to do so.
While available starting in 10.3 "Panther," calling TransformProcessType on a UIElement application in 10.3 or 10.4 will return paramErr (-50), rendering it only usable on a full BackgroundOnly? application. Leopard supports foregrounding both UIElement and BackgroundOnly? applications.
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Use it if you want the current CPUTime value after some time.
ProcessMBS.WinFullProcessImagePath as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 9.6 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns empty string on any error like missing permissions.
The path is in the device style "Device\Harddisk0\Partition1\WINNT\System32\test.exe".
Requires Windows Vista or Windows Server 2008 or newer.
Some examples using this method:
ProcessMBS.WinModulePath as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 9.6 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns empty string on any error like missing permissions.
The path is in the typical style "C:\path\name.exe".
Some examples using this method:
ProcessMBS.WinProcessImagePath as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Process | MBS Util Plugin | 9.6 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns empty string on any error like missing permissions.
The path is in the device style "Device\Harddisk0\Partition1\WINNT\System32\test.exe".
Requires Windows XP or Windows Server 2003 or newer.
Some examples using this method:
The items on this page are in the following plugins: MBS Util Plugin.