---
title: NSExistsCommand
framework: foundation
role: symbol
role_heading: Class
path: foundation/nsexistscommand
---

# NSExistsCommand

A command that determines whether a scriptable object exists.

## Declaration

```swift
class NSExistsCommand
```

## Overview

Overview An instance of NSExistsCommand determines whether a specified scriptable object, such as a word, paragraph, or image, exists. When an instance of NSExistsCommand is executed, it evaluates the receiver specifier for the command to determine if it specifies any objects. NSExistsCommand is part of Cocoa’s built-in scripting support. Most applications don’t need to subclass NSExistsCommand.

## Relationships

### Inherits From

- [NSScriptCommand](foundation/nsscriptcommand.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)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Related Documentation

- [Cocoa Scripting Guide](apple-archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_intro/SAppsIntro.html.md)

### Script Commands

- [NSScriptCommand](foundation/nsscriptcommand.md)
- [NSQuitCommand](foundation/nsquitcommand.md)
- [NSSetCommand](foundation/nssetcommand.md)
- [NSMoveCommand](foundation/nsmovecommand.md)
- [NSCreateCommand](foundation/nscreatecommand.md)
- [NSDeleteCommand](foundation/nsdeletecommand.md)
- [NSGetCommand](foundation/nsgetcommand.md)
- [NSCloneCommand](foundation/nsclonecommand.md)
- [NSCountCommand](foundation/nscountcommand.md)
- [NSCloseCommand](foundation/nsclosecommand.md)
