Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSProcessInfoMBS.activeProcessorCount as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Provides the number of active processing cores available on the computer.
Example:
dim p as new NSProcessInfoMBS

MsgBox str(p.activeProcessorCount)
Notes:
Available in Mac OS X v10.5 and later.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.argumentsCount as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: The number of the command-line arguments.
Example:
dim p as new NSProcessInfoMBS

dim i,c as Integer

c=p.argumentCount-1
for i=0 to c
MsgBox p.argument(i)
next
Notes: (Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.automaticTerminationSupportEnabled as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Marks the calling app as supporting automatic termination.
Notes:
Without calling this or setting the equivalent Info.plist key (NSSupportsAutomaticTermination), the above methods (disableAutomaticTermination/enableAutomaticTermination) have no effect, although the counter tracking automatic termination opt-outs is still kept up to date to ensure correctness if this is called later. Currently, passing false has no effect.
This should be called during applicationDidFinishLaunching or earlier.
(Read and Write property)

Feedback, Comments & Corrections

NSProcessInfoMBS.environment as dictionary
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns the variable names and their values in the environment from which the process was launched.
Example:
dim p as new NSProcessInfoMBS
dim d as Dictionary = p.environment
MsgBox str(d.Count)
Notes: (Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.globallyUniqueString as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns a global unique identifier for the process.
Example:
dim p as new NSProcessInfoMBS

MsgBox p.globallyUniqueString // shows for example "072EC09A-4825-11DD-BDC0-001D4F46F5E0-18405-00000CA853EB5B46"
Notes:
Returns the Global ID for the process. The ID includes the host name, process ID, and a time stamp, which ensures that the ID is unique for the network.

This method generates a new string each time it is invoked, so it also uses a counter to guarantee that strings created from the same process are unique.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.Handle as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: The internal reference to the NSProcessInfo object.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSProcessInfoMBS.hostName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns the name of the host computer.
Example:
dim p as new NSProcessInfoMBS

MsgBox p.hostName // for example "iMac.local"
Notes: (Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.operatingSystem as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns a constant to indicate the operating system on which the process is executing.
Example:
dim p as new NSProcessInfoMBS

MsgBox str(p.operatingSystem) // shows 5 = NSMACHOperatingSystem
Notes:
Operating system identifier. See "Constants" for a list of possible values. In Mac OS X, it's NSMACHOperatingSystem.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.operatingSystemName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns a string containing the name of the operating system on which the process is executing.
Example:
dim p as new NSProcessInfoMBS

MsgBox p.operatingSystemName // shows "NSMACHOperatingSystem"
Notes:
Operating system name. In Mac OS X, it's "NSMACHOperatingSystem"
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.operatingSystemVersionString as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns a string containing the version of the operating system on which the process is executing.
Example:
dim p as new NSProcessInfoMBS

MsgBox p.operatingSystemVersionString // "Version 10.5.4 (Build 9E17)"
Notes:
Returns the Operating system version. This string is human readable, localized, and is appropriate for displaying to the user. This string is not appropriate for parsing.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.physicalMemory as UInt64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Provides the amount of physical memory on the computer.
Example:
dim p as new NSProcessInfoMBS

MsgBox str(p.physicalMemory)
Notes:
Available in Mac OS X v10.5 and later.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.processIdentifier as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Returns the identifier of the process.
Example:
dim p as new NSProcessInfoMBS

MsgBox str(p.processIdentifier)
Notes: (Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.processName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: The name of the process.
Example:
dim p as new NSProcessInfoMBS

MsgBox p.processName
Notes:
The process name is used to register application defaults and is used in error messages. It does not uniquely identify the process.

You can assign a new value, but:
User defaults and other aspects of the environment might depend on the process name, so be very careful if you change it. Setting the process name in this manner is not thread safe.
(Read and Write property)

Feedback, Comments & Corrections

NSProcessInfoMBS.processorCount as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Provides the number of processing cores available on the computer.
Example:
dim p as new NSProcessInfoMBS

MsgBox str(p.processorCount)
Notes:
Available in Mac OS X v10.5 and later.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.systemUptime as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 9.6 Yes No No Yes, macOS only No
Function: Returns the how long it has been since the computer has been restarted.
Notes:
Returns an NSTimeInterval indicating how long system the computer has been restarted.
Available in Mac OS X v10.6 and later.
(Read only property)

Feedback, Comments & Corrections

NSProcessInfoMBS.thermalState as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Process MBS MacCocoa Plugin 15.1 Yes No No Yes, macOS only No
Function: Retrieve the current thermal state of the system.
Example:
dim n as NSProcessInfoMBS = NSProcessInfoMBS.processInfo

Select case n.thermalState
case n.NSProcessInfoThermalStateNominal
MsgBox "Thermal State: Nominal"
case n.NSProcessInfoThermalStateFair
MsgBox "Thermal State: Fair"
case n.NSProcessInfoThermalStateSerious
MsgBox "Thermal State: Serious"
case n.NSProcessInfoThermalStateCritical
MsgBox "Thermal State: Critical"
else
MsgBox "Thermal State: Unknown"
end Select
Notes:
On systems where thermal state is unknown or unsupported, the value returned from the thermalState property is always NSProcessInfoThermalStateNominal.

Available in Mac OS X 10.10.3 and newer.
Returns -1 if function is called on older Mac OS X versions, Linux or Windows.
(Read only property)

Feedback, Comments & Corrections

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





Links
MBS Xojo Chart Plugins