---
title: source
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsapplescript/source
---

# source

The script source for the receiver.

## Declaration

```swift
var source: String? { get }
```

## Discussion

Discussion It is possible for an NSAppleScript that has been instantiated with init(contentsOf:error:) to be a script for which the source code is not available but is nonetheless executable.

## See Also

### Getting Information About a Script

- [isCompiled](foundation/nsapplescript/iscompiled.md)
