<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/windowNumbers(options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(cm)windowNumbersWithOptions:"
  },
  "title" : "windowNumbers(options:)"
}
-->

# windowNumbers(options:)

Returns the window numbers for all visible windows satisfying the specified options.

```
class func windowNumbers(options: NSWindow.NumberListOptions = []) -> [NSNumber]?
```

## Parameters

`options`

The possible options are specified in [`NSWindow.NumberListOptions`](/documentation/AppKit/NSWindow/NumberListOptions).

## Return Value

An array of window numbers for all visible windows satisfying the specified options. (Windows on the active space are returned in z-order; that is, front to back.)

---

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)