Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSRunningApplicationMBS class.

NSRunningApplicationMBS.activationPolicy as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the activation policy of the application. (read-only)

The value returned by this property is usually fixed, but it may change through a call to activateWithOptions.
Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.active as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates whether the application is currently frontmost. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox str(n.active)

Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.bundleIdentifier as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the CFBundleIdentifier of the application. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox n.bundleIdentifier

The value of this property will be nil if the application does not have an Info.plist.
(Read only property)

NSRunningApplicationMBS.bundleURL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the URL to the application's bundle. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox n.bundleURL

Available in Mac OS X v10.6 and later.
(Read only property)

Some examples using this property:

NSRunningApplicationMBS.executableArchitecture as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the URL to the application's executable. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox str(n.executableArchitecture) // shows 7

Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.executableURL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the URL to the application's executable. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox n.executableURL

Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.finishedLaunching as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates whether the receiver's process has finished launching, (read-only)

The value of this property corresponds to the running application having received an NSApplicationDidFinishLaunchingNotification notification internally. Some applications do not post this notification (applications that do not rely on NSApplication) and so are never reported as finished launching.
Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The internal reference to the NSRunningApplication object.

(Read and Write property)

NSRunningApplicationMBS.hidden as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates whether the application is currently hidden. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox str(n.hidden)

Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.icon as NSImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the icon for the receiver's application. (read-only)
Example
dim n as new NSRunningApplicationMBS

dim i as NSImageMBS = n.icon

// without this call the size is 32x32 Pixel
i.setSize 512,512

Backdrop = i.CopyPictureWithMask

Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.launchDate as date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the date when the application was launched. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox n.launchDate.ShortTime

This property is not available for all applications. Specifically, it is not available for applications that were launched not launched by LaunchServices.
Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.launchDateTime as DateTime

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 20.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the date when the application was launched. (read-only)

This property is not available for all applications. Specifically, it is not available for applications that were launched not launched by LaunchServices.
Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.localizedName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the localized name of the application. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox n.localizedName

The value of this property is dependent on the current localization of the application and is suitable for presentation to the user.
Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.ownsMenuBar as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns whether the application owns the current menu bar.
Example
// put in a timer...
dim r as NSRunningApplicationMBS = NSRunningApplicationMBS.currentApplication
window1.Title = str(r.ownsMenuBar)

Available in Mac OS X v10.7 and later.
(Read only property)

NSRunningApplicationMBS.processIdentifier as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates the process identifier (pid) of the application. (read-only)
Example
dim n as new NSRunningApplicationMBS

MsgBox str(n.processIdentifier)

Not all applications have a pid. Applications without a return a value of -1.
Do not rely on this for comparing processes, instead compare NSRunningApplication instances using isEqual:.
Available in Mac OS X v10.6 and later.
(Read only property)

NSRunningApplicationMBS.terminated as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Process MBS MacCocoa Plugin 9.7 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates that the receiver's application has terminated. (read-only)

The value of terminated is true if the receiver's application has terminated, otherwise false.
This property is observable using key-value observing.
Available in Mac OS X v10.6 and later.
(Read only property)

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


The biggest plugin in space...