Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

imranpundeer

macrumors newbie
Original poster
Jan 10, 2009
25
0
Hi All,
I am new in MAC programming. I made a plgin for Context Menu Handler.
I added an element in Context Menu and want to launch an application after click the menu item with command lin argument. Please help me out how can i launch the application through click of that menu handler.

Any helpp would be appricated.

Regards,
Imran.
 
You can use Launch Services to open an application. Here's a sample:
Code:
CFStringRef path = CFSTR("/Applications/TextEdit.app");
CFURLRef appURL = CFURLCreateWithFileSystemPath(NULL, path, kCFURLPOSIXPathStyle, false);
LSOpenCFURLRef(appURL, NULL);
CFRelease(appURL);
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.