---
title: AMAppleScriptAction
framework: automator
role: symbol
role_heading: Class
path: automator/amapplescriptaction
---

# AMAppleScriptAction

An object that represents Automator actions whose runtime behavior is driven by an AppleScript script.

## Declaration

```swift
class AMAppleScriptAction
```

## Overview

Overview An AMAppleScriptAction object holds the compiled script as an instance of the OSAScript class. By default, the OSAScript object is instantiated from the script in the Xcode project file main.applescript. When you create a Automator Applescript Action project in Xcode, the project template supplies an AMAppleScriptAction instance as File’s Owner of the action bundle. This ready-made instance provides a default implementation of the AMAction run(withInput:) method that uses the logic defined in the script. You can substitute your own subclass of AMAppleScriptAction for File’s Owner if you need to.

## Topics

### Accessing the script

- [script](automator/amapplescriptaction/script.md)

## Relationships

### Inherits From

- [AMBundleAction](automator/ambundleaction.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)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
