---
title: objectSpecifier
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsdocument/objectspecifier
---

# objectSpecifier

Returns the object specifier that represents the document.

## Declaration

```swift
var objectSpecifier: NSScriptObjectSpecifier { get }
```

## Return Value

Return Value The document object specifier.

## Discussion

Discussion An object specifier represents an AppleScript reference form, which is a natural-language expression such as words 10 through 20 or front document. During script processing, an object contained by a document (such as the second paragraph or the third rectangle) may need to specify its container (the document).

## See Also

### Handling Script Commands

- [handleClose(_:)](appkit/nsdocument/handleclose(_:).md)
- [handlePrint(_:)](appkit/nsdocument/handleprint(_:).md)
- [handleSave(_:)](appkit/nsdocument/handlesave(_:).md)
- [lastComponentOfFileName](appkit/nsdocument/lastcomponentoffilename.md)
