I'm working on "Image Replaste!", a simple Image replace plugin that uses your copied image in your clipboard as the replaceImage. Github: https://github.com/mheesakkers/sketch-image-replaste
How it works:
1. Copy an image or make a screenshot
2. Select shapeLayers or bitmapLayers
Everything works fine when you copy one single image but when you copy multiple images Sketch converts the selection to a single bitmap and uses this as the replaceImage. I want to check if pasteBoardItems has more items than 1 but I can't figure out how to get the count of this. Sketch won't log, for example pasteBoardItems.count(). What to do? Improvements?
var pasteBoard = NSPasteboard.generalPasteboard();
var pasteBoardItems = pasteBoard.pasteBoardItems;
// sketch.message('Count: ' + pasteBoard.pasteBoardItems.count()); - doesn't work
Thanks in advance!