---
title: receiversSpecifier
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsscriptcommand/receiversspecifier
---

# receiversSpecifier

Sets the object specifier to receiversSpec that, when evaluated, indicates the receiver or receivers of the command.

## Declaration

```swift
var receiversSpecifier: NSScriptObjectSpecifier? { get set }
```

## Discussion

Discussion If you create a subclass of NSScriptCommand, you don’t necessarily need to override this method, though some of Cocoa’s subclasses do. An override should perform the same function as the superclass method, with a critical difference: it causes the container specifier part of the passed-in object specifier to become the receiver specifier of the command, and the key part of the passed-in object specifier to become the key specifier. In an override, for example, if receiversRef is a specifier for the third rectangle of the first document, the receiver specifier is the first document while the key specifier is the third rectangle.

## See Also

### Accessing receivers

- [evaluatedReceivers](foundation/nsscriptcommand/evaluatedreceivers.md)
