---
title: "handleSave(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/handlesave(_:)"
---

# handleSave(_:)

Handles the AppleScript command to save the window (and its associated document, if any).

## Declaration

```swift
func handleSave(_ command: NSScriptCommand) -> Any?
```

## Discussion

Discussion If there’s a corresponding document and the window is the main window of the document, it forwards the save command to the corresponding document. Otherwise, this method does nothing.

## See Also

### Handling Script Commands

- [handleClose(_:)](appkit/nswindow/handleclose(_:).md)
- [handlePrint(_:)](appkit/nswindow/handleprint(_:).md)
