<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptObjectSpecifier/init(containerSpecifier:key:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptObjectSpecifier(im)initWithContainerSpecifier:key:"
  },
  "title" : "init(containerSpecifier:key:)"
}
-->

# init(containerSpecifier:key:)

Returns an `NSScriptObjectSpecifier` object initialized with a given container specifier  and key.

```
convenience init(containerSpecifier container: NSScriptObjectSpecifier, key property: String)
```

## Return Value

An `NSScriptObjectSpecifier` object  initialized with container specifier `specifier` and key `key`.

## Discussion

The class description of the container is set automatically.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)