Mac OS X Pasteboard Viewer : NSPasteboard extract

I realise you've already found this, but for the benefit of people who turn up here from Google, the solution given for RTF data at Getting RTF data out of Mac OS X pasteboard (clipboard) works fine for getting HTML out of the clipboard, too. That is, the command. Oct 19, 2017  Safari Technology Preview 42 for Mac Release Offers Bug Fixes and Feature Enhancements Chris Hauk - Oct 19, 2017 Apple on Wednesday released Safari Technology Preview 42, a new version of their experimental web browser, first released in March 2016.

writeOutPasteboard.m
Pasteboard helper
#import<Foundation/Foundation.h>
#import<AppKit/AppKit.h>
intmain(int argc, char *argv[]) {
@autoreleasepool {
NSPasteboard *pasteboard = [NSPasteboardgeneralPasteboard];
NSLog(@'items: %@', pasteboard.pasteboardItems);
for (NSPasteboardItem *item in pasteboard.pasteboardItems) {
NSLog(@'types: %@', item.types);
for (NSString *type in item.types) {
NSData *data = [item dataForType:type];
NSString *string = [item stringForType:type];
NSLog(@'%@: %@', type, string);
NSLog(@'%@: %@', type, data);
NSString *writeOutPath = [NSStringstringWithFormat:@'~/Temp/%@', type];
writeOutPath = [writeOutPath stringByExpandingTildeInPath];
[data writeToFile:writeOutPath atomically:YES];
}
}
}
}

commented Feb 2, 2016

I recommend running this with CodeRunner 😃https://coderunnerapp.com/

Wifi driver for mac os sierra. How to install the driver manually on MAC OS? 5.After MAC is rebooted, please click the Wi-Fi icon to “Open Wireless Utility”, then you can choose your Wi-Fi and connect it. (Note: it may take time for utility to search W i-Fi, please wait patiently for about 1 min.).

Inspector
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment