On Jun 18, 2008, at 6:01 PM, Glen Low wrote:
Is there any command-line tool that will invoke a Services menu
command with standard input as the data to be transformed?
Not that I know of, but it should be pretty easy to write one.
Invoking a service with a string looks something like this:
NSPasteboard *pboard = [NSPasteboard pasteboardWithUniqueName];
[pboard declareTypes:[NSArray arrayWithObject:NSStringPboardType]
owner:nil];
[pboard setString:@"Hello, world" forType:NSStringPboardType];
NSPerformService(@"Mail/Send Selection", pboard);
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]