---
title: "init(commandDescription:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsscriptcommand/init(commanddescription:)"
---

# init(commandDescription:)

Returns an a script command object initialized from the passed command description.

## Declaration

```swift
init(commandDescription commandDef: NSScriptCommandDescription)
```

## Parameters

- `commandDef`: A command description for the command to be created.

## Return Value

Return Value A newly initialized instance of NSScriptCommand or a subclass.

## Discussion

Discussion To make this command object usable, you must set its receiving objects and arguments (if any) after invoking this method.

## See Also

### Related Documentation

- [Cocoa Scripting Guide](apple-archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_intro/SAppsIntro.html.md)
- [receiversSpecifier](foundation/nsscriptcommand/receiversspecifier.md)
- [arguments](foundation/nsscriptcommand/arguments.md)
