to add them programatically, i do this (EX: Eject item)
but how is it possible to remove that same eject menu item programatically? it seems that /usr/bin/killall is only good for system apps (Safari, Finder, etc.) and that i can't set a array path for system apps to be used in setArguments.
so neither of these work:
/usr/bin/killall /System/Library/CoreServices/Menu Extras/Eject.menu
/usr/bin/killall Eject.menu
/usr/bin/killall Eject
Code:
NSTask *showEjectTask;
showEjectTask = [[NSTask alloc] init];
[showEjectTask setLaunchPath:@"/usr/bin/open"];
[showEjectTask setArguments: [NSArray arrayWithObject:@"/System/Library/CoreServices/Menu Extras/Eject.menu"]];
[showEjectTask launch];
[showEjectTask release];
but how is it possible to remove that same eject menu item programatically? it seems that /usr/bin/killall is only good for system apps (Safari, Finder, etc.) and that i can't set a array path for system apps to be used in setArguments.
so neither of these work:
/usr/bin/killall /System/Library/CoreServices/Menu Extras/Eject.menu
/usr/bin/killall Eject.menu
/usr/bin/killall Eject