• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Services menu invoke from the command line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Services menu invoke from the command line?


  • Subject: Re: Services menu invoke from the command line?
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 19 Jun 2008 10:11:05 -0700


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Services menu invoke from the command line? (From: Glen Low <email@hidden>)

  • Prev by Date: Re: NSURLRequest conditional GET
  • Next by Date: Re: Can't sort NSTableView
  • Previous by thread: Services menu invoke from the command line?
  • Next by thread: CFWriteStreamWrite Blocking if we give invalid Host.
  • Index(es):
    • Date
    • Thread