Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSAppleEventDescriptorMBS class.

NSAppleEventDescriptorMBS.aeDesc as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns a pointer to the AEDesc structure that is encapsulated by the receiver, if it has one.

If the receiver has a valid AEDesc structure, returns a pointer to it; otherwise returns nil.
(Read only property)

NSAppleEventDescriptorMBS.applicationURLValue as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 16.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The application URL.
Example
dim f as FolderItem = SpecialFolder.Applications.Child("Stickies.app")
dim u as string = f.URLPath
dim d as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithApplicationURL(u)
MsgBox d.applicationURLValue

(Read only property)

NSAppleEventDescriptorMBS.booleanValue as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a Boolean value, coercing (to typeBoolean) if necessary.
Example
dim lines(-1) as string

lines.Append "set a to 1"
lines.Append "set b to 1"
lines.Append "return a = b" // return a boolean result

// compile, run and show value
dim source as string = Join(lines,EndOfLine)
dim n as new NSAppleScriptMBS(source)

dim error as Dictionary
dim d as NSAppleEventDescriptorMBS = n.execute(Error)

MsgBox str(d.booleanValue)

Returns the contents of the descriptor, as a Boolean value, or false if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.bundleIDValue as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 16.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Queries the bundle identifier.
Example
dim d as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithBundleIdentifier("com.apple.iCal")
MsgBox d.bundleIDValue

(Read only property)

NSAppleEventDescriptorMBS.data as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the receiver's data as a memoryblock.

Returns an instance of memoryblock containing the receiver's data, or nil if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.dateTimeValue as DateTime

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 20.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a date value.

(Read only property)

NSAppleEventDescriptorMBS.dateValue as date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a date value.
Example
dim d as new date
dim n as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithDate(d)

dim x as date = n.dateValue
MsgBox x.LongDate+" "+x.LongTime // shows today

(Read only property)

NSAppleEventDescriptorMBS.description as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 12.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The descriptor for this event.
Example
dim n as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithString("Hello")
MsgBox n.description

This is a text representation for debugging.
(Read only property)

NSAppleEventDescriptorMBS.descriptorType as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the descriptor type of the receiver.

(Read only property)

NSAppleEventDescriptorMBS.doubleValue as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a double.
Example
dim a as NSAppleEventDescriptorMBS
a = NSAppleEventDescriptorMBS.descriptorWithString("5")
MsgBox str(a.doubleValue) // shows 5

(Read only property)

NSAppleEventDescriptorMBS.enumCodeValue as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as an enumeration type, coercing (to typeEnumerated) if necessary.

Returns the contents of the descriptor, as an enumeration type, or 0 if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.eventClass as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the event class for the receiver.

Returns the event class (a four-character code) for the receiver, or 0 if an error occurs.

The receiver must be an Apple event. An Apple event is identified by its event class and event ID, a pair of four-character codes stored as 32-bit integers. For example, most events in the Standard suite have the four-character code 'core' (defined as the constant kAECoreSuite in AE.framework, a subframework of ApplicationServices.framework). For more information on event classes and event IDs, see Building an Apple Event in Apple Events in Apple Events Programming Guide.
(Read only property)

NSAppleEventDescriptorMBS.eventID as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the event ID for the receiver.

The event ID (a four-character code) for the receiver, or 0 if an error occurs.

The receiver must be an Apple event. An Apple event is identified by its event class and event ID, a pair of four-character codes stored as 32-bit integers. For example, the open Apple event from the Standard suite has the four-character code 'odoc' (defined as the constant kAEOpen in AE.framework, a subframework of ApplicationServices.framework).
(Read only property)

Some examples using this property:

NSAppleEventDescriptorMBS.fileURLValue as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 16.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The file URL.
Example
dim f as FolderItem = SpecialFolder.Applications.Child("Stickies.app")
dim d as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithFileURL(f)
MsgBox d.fileURLValue

(Read only property)

NSAppleEventDescriptorMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the internal reference to the NSAppleEventDescriptor object.

(Read and Write property)

NSAppleEventDescriptorMBS.int16Value as Int16

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as an int16.
Example
dim a as NSAppleEventDescriptorMBS
a = NSAppleEventDescriptorMBS.descriptorWithString("5")
MsgBox str(a.int16Value) // shows 5

(Read only property)

NSAppleEventDescriptorMBS.int32Value as Int32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as an integer, coercing (to typeSInt32) if necessary.
Example
dim a as NSAppleEventDescriptorMBS
a = NSAppleEventDescriptorMBS.descriptorWithString("5")
MsgBox str(a.int32Value) // shows 5

Returns the contents of the descriptor, as an integer value, or 0 if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.isRecordDescriptor as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 16.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Return whether or not a descriptor is a record-like descriptor.

Record-like descriptors function as records, but may have a descriptorType other than AERecord, such as ObjectSpecifier.
(Read only property)

NSAppleEventDescriptorMBS.numberOfItems as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the number of descriptors in the receiver's descriptor list.
Example
dim n as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.listDescriptor
dim d as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithString("Hello")
dim e as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithString("World")

n.insertDescriptor(d,1)
n.insertDescriptor(e,2)

MsgBox str(n.numberOfItems)

dim x1 as NSAppleEventDescriptorMBS = n.descriptorAtIndex(1)
dim x2 as NSAppleEventDescriptorMBS = n.descriptorAtIndex(2)
MsgBox x1.stringValue+" "+x2.stringvalue

Returns the number of descriptors in the receiver's descriptor list (possibly 0); returns 0 if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.processIDValue as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 16.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Queries the process ID.
Example
// get my PID
dim p as new ProcessMBS
p.GetCurrentProcess
dim pid as Integer = p.ProcessID

// make process ID descriptor
dim n as NSAppleEventDescriptorMBS = NSAppleEventDescriptorMBS.descriptorWithProcessIdentifier(pid)

// show it
MsgBox "ProcessID: "+str(n.processIDValue) + EndOfLine + n.stringValue

(Read only property)

NSAppleEventDescriptorMBS.returnID as Int16

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the receiver's return ID (the ID for a reply Apple event).

Returns the receiver's return ID (an integer value), or 0 if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.singleValue as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a single value.
Example
dim a as NSAppleEventDescriptorMBS
a = NSAppleEventDescriptorMBS.descriptorWithString("5")
MsgBox str(a.singleValue) // shows 5

(Read only property)

NSAppleEventDescriptorMBS.stringValue as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a Unicode text string, coercing (to typeUnicodeText) if necessary.
Example
dim a as NSAppleEventDescriptorMBS

a = NSAppleEventDescriptorMBS.descriptorWithString("Hello World")

MsgBox a.stringValue

Returns the contents of the descriptor, as a string, or "" if an error occurs.
(Read only property)

NSAppleEventDescriptorMBS.transactionID as Int32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the receiver's transaction ID, if any.

Returns the receiver's transaction ID (an integer value), or 0 if an error occurs.

The receiver must be an Apple event. Currently provides no indication if an error occurs. For more information on transactions, see the description for appleEventWithEventClass.
(Read only property)

NSAppleEventDescriptorMBS.typeCodeValue as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as a type, coercing (to typeType) if necessary.

(Read only property)

NSAppleEventDescriptorMBS.UInt32Value as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Apple Script MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the contents of the receiver as an UInt32.
Example
dim a as NSAppleEventDescriptorMBS
a = NSAppleEventDescriptorMBS.descriptorWithString("5")
MsgBox str(a.UInt32Value) // shows 5

(Read only property)

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


The biggest plugin in space...