Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSTaskMBS.currentDirectoryPath as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: The task's current directory.
Notes: (Read and Write property)

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

NSTaskMBS.isRunning as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: Returns whether the receiver is still running.
Notes: (Read only property)

Feedback, Comments & Corrections

NSTaskMBS.launchPath as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: The path of the receiver's executable.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSTaskMBS.processIdentifier as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: Returns the receiver's process identifier.
Example:
dim args(-1) as string
dim task as NSTaskMBS = NSTaskMBS.launchedTaskWithLaunchPath("/bin/ls", args)

MsgBox "PID: "+str(task.processIdentifier)
Notes: (Read only property)

Feedback, Comments & Corrections

NSTaskMBS.qualityOfService as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 15.3 Yes No No Yes, macOS only No
Function: The quality of service setting for this application.
Notes:
read-only after the task is launched.
(Read and Write property)

Feedback, Comments & Corrections

NSTaskMBS.terminationReason as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: Returns the reason the task was terminated.
Example:
// Launch "ls -l -a -t" in the current directory, and then read the result into a string:

dim args(-1) as string
dim task as NSTaskMBS = NSTaskMBS.launchedTaskWithLaunchPath("/bin/ls", args)

if not task.isRunning then
dim status as Integer = Task.terminationReason

MsgBox "Task termination reason is: "+str(status)
end if
Notes:
Available in Mac OS X v10.6 and later.

see this constants:
NSTaskTerminationReasonExit = 1The task exited normally.
NSTaskTerminationReasonUncaughtSignal = 2The task exited due to an uncaught signal.
(Read only property)

Feedback, Comments & Corrections

NSTaskMBS.terminationStatus as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Tasks MBS MacCocoa Plugin 9.7 Yes No No Yes, macOS only No
Function: Returns the exit status returned by the receiver's executable.
Example:
// Launch "ls -l -a -t" in the current directory, and then read the result into a string:

dim args(-1) as string
dim task as NSTaskMBS = NSTaskMBS.launchedTaskWithLaunchPath("/bin/ls", args)

if not task.isRunning then
dim status as Integer = Task.terminationStatus

MsgBox "Task return value is: "+str(status)
end if
Notes:
The exit status returned by the receiver's executable.

Each task defines and documents how its return value should be interpreted. For example, many commands return 0 if they complete successfully or an error code if they don't. You'll need to look at the documentation for that task to learn what values it returns under what circumstances.
This method raises an NSInvalidArgumentException if the receiver is still running. Verify that the receiver is not running before you use it.
(Read only property)

Feedback, Comments & Corrections

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




Links
MBS FileMaker blog