[macOS] save clipboard PNG or TIFF to current Finder window
✓ Published0🌍 Public
TTBD
Last edited Dec 13, 2018
Created on Dec 13, 2018
This example demonstrates a macOS Automator Quick Action that saves clipboard images directly into the current Finder window. It checks the clipboard for PNG or TIFF data and writes matching files as `clipboard.png` or `clipboard.tiff` using the AppKit `NSPasteboard` API and its `dataForType` method. The code retrieves the target folder path via Finder’s `finderWindows` and `NSURL` file system representation, then triggers `writeToFileAtomically` to save the binary data. It also provides audio and notification feedback using `displayNotification` and `app.say` when no image is present.
AI-generated description