Skip to main content
100%

Pasteboard

✓ Published0🌍 Public
KKevinGutowski
Last edited Jun 10, 2020
Created on Jun 10, 2020

This example demonstrates the various formats a copied Sketch object can take when retrieved from the system pasteboard. It shows that a single clipboard item contains multiple simultaneously available data representations, including native Sketch JSON, Adobe PDF, and TIFF image data. The visualization uses AppleScript’s `NSPasteboard.generalPasteboard().pasteboardItems()` API to access clipboard contents, then calls `items[0].types()` to list the available MIME types and `items[0].dataForType('com.bohemiancoding.sketch.v3')` to extract the raw binary data, which appears as a hexadecimal dump. The code reveals the clipboard’s multi-format nature without rendering any graphical output.

AI-generated description

Similar vizzes