Last active
December 20, 2015 14:49
-
-
Save keefo/6149741 to your computer and use it in GitHub Desktop.
Post Weibo via Miao
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ([[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"com.beyondcow.Miao"]) { | |
//if find Miao on this Mac then post text via Miao system service port | |
NSString *text = @"Hello world!"; | |
[[NSPasteboard generalPasteboard] clearContents]; | |
[[NSPasteboard generalPasteboard] setString:text forType:NSStringPboardType]; | |
NSPerformService(@"Miao Post Weibo", [NSPasteboard generalPasteboard]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment