---
title: NSScriptCommandDescription
framework: foundation
role: symbol
role_heading: Class
path: foundation/nsscriptcommanddescription
---

# NSScriptCommandDescription

A script command that a macOS app supports.

## Declaration

```swift
class NSScriptCommandDescription
```

## Overview

Overview A scriptable application provides scriptability information that describes the commands and objects scripters can use in scripts that target the application. An application’s scripting information is collected automatically by an instance of NSScriptSuiteRegistry, which creates an NSScriptCommandDescription for each command it finds, caches these objects in memory, and installs a command handler for each command. A script command instance stores the name, class, argument types, and return type of a command. For example, commands in AppleScript’s Core suite include clone, count, create, delete, exists, and move. The public methods of NSScriptCommandDescription are used primarily by Cocoa’s built-in scripting support in responding to Apple events that target the application. Although you can subclass the NSScriptCommandDescription class, it is unlikely that you would need to do so, or to create instances of it.

## Topics

### Initializing a Script Command Description

- [init(suiteName:commandName:dictionary:)](foundation/nsscriptcommanddescription/init(suitename:commandname:dictionary:).md)

### Getting Basic Information About the Command

- [appleEventClassCode](foundation/nsscriptcommanddescription/appleeventclasscode.md)
- [appleEventCode](foundation/nsscriptcommanddescription/appleeventcode.md)
- [commandClassName](foundation/nsscriptcommanddescription/commandclassname.md)
- [commandName](foundation/nsscriptcommanddescription/commandname.md)
- [suiteName](foundation/nsscriptcommanddescription/suitename.md)

### Getting Command Argument Information

- [appleEventCodeForArgument(withName:)](foundation/nsscriptcommanddescription/appleeventcodeforargument(withname:).md)
- [argumentNames](foundation/nsscriptcommanddescription/argumentnames.md)
- [isOptionalArgument(withName:)](foundation/nsscriptcommanddescription/isoptionalargument(withname:).md)
- [typeForArgument(withName:)](foundation/nsscriptcommanddescription/typeforargument(withname:).md)

### Getting Command Return-Type Information

- [appleEventCodeForReturnType](foundation/nsscriptcommanddescription/appleeventcodeforreturntype.md)
- [returnType](foundation/nsscriptcommanddescription/returntype.md)

### Creating Commands

- [createCommandInstance()](foundation/nsscriptcommanddescription/createcommandinstance().md)
- [createCommandInstance(with:)](foundation/nsscriptcommanddescription/createcommandinstance(with:).md)

### Initializers

- [init(coder:)](foundation/nsscriptcommanddescription/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Script Dictionary Description

- [NSScriptSuiteRegistry](foundation/nsscriptsuiteregistry.md)
- [NSScriptClassDescription](foundation/nsscriptclassdescription.md)
- [NSClassDescription](foundation/nsclassdescription.md)
